Fivefold / linkding-injector

Injects search results from the linkding bookmark service into search pages like google and duckduckgo
MIT License
216 stars 8 forks source link

Add compatibility with manifest v3 #4

Closed GermanDarknes closed 1 year ago

GermanDarknes commented 2 years ago

This pr will update the manifest to use V3 instead of V2 (the end is near: https://developer.chrome.com/blog/mv2-transition/) with all necessary code changes.

I did not test it in Firefox and npx web-ext lint breaks with manifest V3, that's the reason why marked it as draft.

Fivefold commented 2 years ago

Thank you! This has been on my radar, but Firefox does not support background service workers (as a replacement to the persistent background script) yet. They are planning to add support and I hope they will do so before the end of 2022.

An alternative may be to convert the persistent background script to non-persistent. This would require more changes in the code though.

Let's keep this open and come back to it either when Mozilla adds support for background service workers or it's near the end of the year. If you want to convert the background script to non-persistent to get it done sooner feel free to do so, but I'd recommend waiting for now.

Fivefold commented 1 year ago

Hey @GermanDarknes, thank you again for your PR! I finally did the change to manifest v3 (at least for Chrome) and used part of your code changes. Unfortunately I also made substantial changes in other parts of the code, so I couldn't outright use your PR.

If you want to, I can add a 'thank you' note in the acknowledgement section of the README or alternatively you could do it yourself via PR so you are also listed as a Contributor in Github. Please tell me what you think.