manifest: Use browser_specific_settings for Firefox/Chrome compatibility - #32
manifest: Use browser_specific_settings for Firefox/Chrome compatibility#32liskin wants to merge 1 commit into
Conversation
Since Firefox 48, it's possible to use browser_specific_settings instead of applications. This way, the manifest works without modification across most browsers. It's also the correct key according to webextensions draft: https://browserext.github.io/browserext/#dfn-browserspecificsettings
|
I don't think that Chrome respects this value:
I upload separate versions to Chrome Store and Mozilla. The comment works better for now. Do you know of this working for Chrome on other extensions? |
|
Yes, Chrome does show a warning, but that warning is harmless. All my extensions (https://github.com/liskin/strava-map-switcher, https://github.com/liskin/empty-tab) use it without any trouble, and I upload the exact same code to both extension stores. Chrome does not respect the value, but you don't need it to respect it. All you need is for Chrome to ignore it. |
|
While I see the value for testing and some code cleanliness, I don't think I will merge this change. Since I need to deploy separately, the effort to remove the code block is minimal and no warnings are better than warnings which can be ignored. My concern is that Chrome may change its behavior in the future forcing a quick turn around for an update. |
|
Fair enough. My primary motivation was being able to use your extension in both Chrome and Firefox from one git clone without any modifications, but I can carry local patches with no problem. |
|
I think what I may do is switch to your recommendation and then comment it out or I may leave it in with a comment to remove it for Chrome builds. I need to think about it a bit more. |
- Bumped extension version to 3.0.0 since it will be breaking - Set minimum chrome version to version after introduction of v3 - Background script now needs to be a service worker - The directive for options_ui changed - Moved the FireFox specific settings per Mozilla documentation, but still commented out since Chrome doesn't accept it (Originally proposed by @liskin in PR #32)
Since Firefox 48, it's possible to use browser_specific_settings instead
of applications. This way, the manifest works without modification
across most browsers.
It's also the correct key according to webextensions draft:
https://browserext.github.io/browserext/#dfn-browserspecificsettings