Open rougetimelord opened 6 months ago
Oh Mozilla/Google, very nice of you to make everything complicated and hard to support cross browsers!
Seems like Firefox 102ESR is past EOL (9/26/2023), and Firefox 115.2.0ESR released in August 2023 which afaik means that (most) ESR installations should support Mv3.
It would be nice to have a single manifest.json file for Firefox and Chrome. We could do this by migrating Firefox to MV3.
The main issue is how we load our service worker or background script (for Firefox). According to MDN:
background.scripts
field for MV3 extensions. Chrome <121 it will refuse to load the extension entirely.background.service_worker
and will run thebackground.scripts
normally. Firefox <121 will not runbackground.scripts
ifbackground.service_worker
is present.background.service_worker
and/orbackground.scripts
, and gives priority tobackground.service_worker
.We would also still need to add
browser_specific_settings
for Firefox. Due to that we could keep thebackground.service_worker
key replacement in our build process, to make sure that Firefox <121 is supported.In terms of code changes according to Mozilla's extension tester, the only change needed would be to remove
chrome.runtime.restartAfterDelay
from src/constants.ts. I think that's fine since we don't ever use it, and it should probably be removed anyways.