Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manifest: Use browser_specific_settings for Firefox/Chrome compatibility #32

Open
wants to merge 1 commit into
base: web-extension
Choose a base branch
from

Conversation

liskin
Copy link

@liskin liskin commented Oct 13, 2020

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

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
@erichgoldman
Copy link
Owner

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?

@liskin
Copy link
Author

liskin commented Nov 13, 2020

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.

@erichgoldman
Copy link
Owner

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.

@liskin
Copy link
Author

liskin commented Nov 13, 2020

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.

@erichgoldman
Copy link
Owner

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.

erichgoldman added a commit that referenced this pull request Aug 27, 2024
- 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants