Is it possible to convert a Google Chrome extension to a Firefox or Safari browser extension?
相关问题
- How to call firefox addon function with onclick in
- How does same-domain policy apply to background sc
- SQLite Storage in Firefox 3.0 +
- YouTube Data API v3 allowed referers for browser a
- Chrome Extension: How can I get global settings in
相关文章
- Progressive web app(PWA) vs Electron vs Browser ex
- chrome.runtime.getURL vs. chrome.extension.getURL
- Will this hotkey work for Mac users?
- Chrome extension permission for “about:blank” page
- getElementById not working in Google Chrome extens
- Google Chrome extension: How to find out if a user
- Access Add-On SDK 'main' from XUL
- How can my Chrome plugin disable itself via Javasc
I have created a Chrome Api for Safari and Firefox. I've converted a rather large extension to Safari and Firefox using these translation APIs. I have seen that many people ask about possibilities for convert extensions between browsers and I hope someone can help me to complement the APIs with several methods and a task runner to automate the conversion. There is currently a bit of manual work to be done.
https://github.com/kritollm/chrome-extension-api-for-safari-and-firefox
After I first wrote this post, I have been aware of two other projects which are very similar.
https://code.google.com/p/adblockforchrome/source/browse/trunk/port.js and
https://github.com/jetpack-labs/chrome-tailor-jetpack
There is an actively maintained project on GitHub allowing the use of the Chrome Extension API for writing Safari extensions, see https://github.com/avast/topee.
Mozilla are working on their WebExtensions API. They say that with the API Porting add-ons to and from other browsers should be easier.
Both Chrome and Firefox add-ons are essentially based on a JavaScript core, but Firefox is, by design, much more extensible. The Gecko engine and XUL (Mozilla's XML User Interface Language) allow for a much larger degree of freedom in what you can do with your extension, while Chrome (and WebKit) try to sandbox the working of its 'apps'.
So, yes, a Chrome extension can almost definitely be made into a Firefox extension, provided Firefox provides an API for whatever it is that you are trying to do. Just replace the Chrome's DevTools SDK-specific content with Firefox's Jetpack SDK-specific content (such as system calls or whatever else it is that you do within your extension).
The opposite, on the other hand, is not always true. Depending on the functionality in a Firefox extension, it cannot always be converted to work in Chrome.