offline-qr-code
offline-qr-code copied to clipboard
Chrome/ium support
Are there some plans to extend this add-on as a Chrome extension? This article lists all incompatibilities between Firefox and Chrome extensions: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Chrome_incompatibilities
But I already did some testing with this polyfill: https://github.com/mozilla/webextension-polyfill and it works without problems (except that you need to modify the manifest.json a little bit because not all properties are supported by Chrome...)
Or is there a reason why this add-on should not become a Chrome extension?
Or is there a reason why this add-on should not become a Chrome extension?
Only that I likely won't adjust design and stuff for it, i.e. do not actively adjust stuff for it and rather only do minimal tests in Chromium. But I am all for standards, so if the add-on can be adjusted in a sane way to work in Chrome, that's all fine. I would then also publish it there…
As for JS code I would argue to only use polyfills. I.e. E.g. menu
is also not supported in Chrome/ium (but the standardized version), but only contextMenu
. So there rather than changing everything to contextMenu
, one needs to write a (I think) small polyfill, which redirects all calls… I personally never wrote polyfills, but I think that is possible.
And we would maybe need some adjustments so we generate a different ZIP for Chrome/ium, so we don't have to ship that additional (polyfill) JS in the Firefox version.
As for the manifest.json
I think we could even have two versions, one packaged with Chrome/ium and one with Firefox… That file is small and all translations and so on are in other files anyway.
I did some further research and I think we have to drop this idea. In Chrome it is not possible at all to open a popup programmatically which is a huge problem for this add-on as there are quite some actions which depend on this. For more information see: https://bugs.chromium.org/p/chromium/issues/detail?id=399859 https://stackoverflow.com/a/5576816/8575129
Well… we could just leave out support for this. Then we just have no context menus and so on – kinda like version 1.1. right now.
BTW https://github.com/mozilla/webextension-polyfill may help, but it's likely still a little more to do… (Edit: Noticed this has already been linked above.)
Resources:
- https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Chrome_incompatibilities
- https://extensionworkshop.com/documentation/develop/porting-a-google-chrome-extension/