Is there a way to port a chrome extension to other browsers?

Viewed 12651

Is there a way to port a chrome extension to other browsers, without having to entirely re-write the code? My chrome extension uses the browser_action command to open "popup.html" in the extension window...

Update: I found adblockforchrome port.js and found it only somewhat helpful for porting to Safari...

4 Answers

Yes, it's possible with Webextension API using webextension-polyfill.

I made use of it to build this where I only had to change the callback methods to Promises and using browser.something instead of chrome.something to call the browser APIs.

Related