firefox-remove-safelinks
firefox-remove-safelinks copied to clipboard
Making extension compatible with chrome
Introduction
This little contribution aims to make the extension compatible with chrome, as suggested by @BoredGameGeek in the comments of #2 (https://github.com/wtimme/firefox-remove-safelinks/issues/2#issuecomment-1243708622)
The inclusion of browser-polyfills.js seems far from ideal, but i don't know if there's a better/cleaner/prettier way to do it.
All Submissions:
- [X] Have you tested your changes with the
test-page.htmlfile? - [X] Have you added a short summary to the
CHANGELOG.md, or actively decided that it's not worth mentioning?
Thanks a lot for your effort, and sorry for getting back to you with such a delay!
I have taken a look at the proposed changes and reworked them a bit on a branch that I pushed (see the diff here). Mainly, I added a package.json to keep track of updates to the browser-polyfill.min.js file from Mozilla.
When I loaded the addon into Chrome for debugging, I noticed that there was an error:
I tried to resolve it by increasing the manifest version to 3, but was met with an error:
The "background.scripts" key cannot be used with manifest_version 3. Use the "background.service_worker" key instead.
I'm not keeping up with the changes in Chrome all the time, but I remember that there has been some discussion around Manifest version 3, especially when it comes to content blockers/adblockers.
As pointed out above, I have pushed the branch in which I incorporated your changes, so you could use that and test the addon in Chrome. Do you have an idea how the Manifest version 3 can still be supported? Thanks in advance for your time!