Skip to content

Conversation

@foosel
Copy link
Member

@foosel foosel commented Mar 19, 2025

Refactoring attempt for Manifest v3 support (and thus compatibility to current Chrome versions).

All in all this is once more a shitty situation: Chrome now requires Manifest v3 and only supports service_worker scripts for that, whereas Firefox doesn't support service_worker scripts yet and still depends on background scripts. Thankfully Chrome no longer seems to refuse extensions that contain a background script, it just ignores it. And Firefox ignores service_worker. Safari apparently supports both but prefers service_worker. In any case, I've rewritten the background script here to work as both and in both Chrome (chrome.*) and other browsers (browser.*). In other news, fsck Google, Chrome really is the new Internet Explorer...

See #65. I tested this only locally, using an unpacked build, but that worked in both Chrome and Firefox. For easier testing by others I've also (hopefully) added a CI build.

foosel added 5 commits March 19, 2025 11:56
- moved to service worker for Chrome
- polyfill removed as we didn't need it
- instead added suggested workaround from https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/background#browser_support
- manifest set to version 3

All in all this is once more a shitty situation: Chrome now requires Manifest v3 and only supports `service_worker` scripts for that, whereas Firefox doesn't support `service_worker` scripts yet and still depends on `background` scripts. Thankfully Chrome no longer seems to refuse extensions that contain a `background` script, it just ignores it. And Firefox ignores `service_worker`. Safari apparently supports both but prefers `service_worker`. In any case, I've rewritten the background script here to work as both and in both Chrome (`chrome.*`) and other browsers (`browser.*`). In other news, fsck Google, Chrome really is the new Internet Explorer...
Accidentally removed too much when getting rid of the polyfill.
 And I'm pretty sure I installed it as such, but apparently not.
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.

1 participant