lingua-libre / SignIt

🌻 Lingua Libre SignIt web-browser extension translates selected word in French Sign Language via an elegant pop up so you learn sign language while reading online.
https://addons.mozilla.org/en-US/firefox/addon/lingua-libre-signit/
MIT License
13 stars 13 forks source link

Migrate to manifest.json v3.0 #21

Closed hugolpz closed 2 months ago

hugolpz commented 2 years ago

This actually implies to do a bunch of code migration, with async, etc.

Chrome's migration checklist

Chrome provides a migration checklist which points to more actionable resources :

V3 from scratch ?

Resources

Related

hugolpz commented 5 months ago

You can now use both when coding and testing locally, thank to YujiSoftware:

"background": {
    "service_worker": "background.js",
    "scripts": ["background.js"]
},

EDIT: remove "scripts": ["background.js"] when packaging your webext for Chrome Web store. Thank to wolfmanstout for this hint.

Source: https://github.com/mozilla/web-ext/issues/2532#issuecomment-1992345597

kabir-afk commented 5 months ago

Mind reviewing the PR if you are free now😅,I mentioned the same under "Additional Info on Cross browser background scripts"😅

kabir-afk commented 3 months ago

When migrating to service worker , we have to convert timers to alarms as well. And under Updating API calls we have to convert callbacks to Promises. I haven't converted timers to alarms yet and I haven't looked upon the latter.

hugolpz commented 2 months ago

I close this. We consider it done since is works correctly with MV3 approach.

If Chrome / Firefox stores requests changes, it will be to adapt to those stores' requirements, and new issues must be open.