awesome-emoji-picker
awesome-emoji-picker copied to clipboard
Finally test managed storage
Tracked/tested in https://github.com/rugk/offline-qr-code/issues/177
Guide is currently written for that other add-on, but can be adjusted for this one. (most is just the same)
Note that this code block does NOT work in Chrome: https://github.com/TinyWebEx/AutomaticSettings/blob/26c51c6ac40171731f11ec4855a93c591811e301/internal/LoadAndSave.js#L167-L178 and thus blocks #54. It causes all the settings to be identified as managed, which effectively disables the options page:
A simple solution is the replace that block with return Promise.reject();
, which makes the options page work, but obviously disables the managed options feature.
Uhhh, that is unfortunate. The problem seems to be Chrom/ium only supports the sync and local settings storage, i.e. no managed at all.
The question is just, why does browser.storage.managed
then succeed in Chrome/ium? Should not it throw an error?
But well, the fix would then be a browser check and disable that feature for that browser.
Or better maybe "polyfill" the browser.storage.managed
API, so it throws an NotImplemented
exception or so…
Uhhh, that is unfortunate. The problem seems to be Chrom/ium only supports the sync and local settings storage, i.e. no managed at all.
No, Chrome does support managed storage (also see here). That was the first thing I checked when I noticed this issue... 🙂
BTW, there is a link to try it in Chrome at the bottom of this comment. Just rename the chromemanifest.json
file to manifest.json
.
Hmm ok, so what's the issue in Chrome/ium then… maybe the fact that we use Promises is bad and it needs this polyfill?
I am not sure, something in that code block... I stopped debugging it after I found that workaround, which allowed me to finish testing this extension in Chrome. I did use the WebExtension polyfill, as nothing would have worked without that.