firefox-remove-safelinks icon indicating copy to clipboard operation
firefox-remove-safelinks copied to clipboard

Making extension compatible with chrome

Open pataluc opened this issue 2 years ago • 1 comments
trafficstars

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.html file?
  • [X] Have you added a short summary to the CHANGELOG.md, or actively decided that it's not worth mentioning?

pataluc avatar Apr 12 '23 08:04 pataluc

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:

Screenshot 2023-05-01 at 18 19 19

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!

wtimme avatar May 01 '23 16:05 wtimme