lydell / LinkHints

A browser extension that lets you click with your keyboard.
https://lydell.github.io/LinkHints
MIT License
155 stars 8 forks source link

Update to Manifest V3 #50

Open lydell opened 2 years ago

lydell commented 2 years ago

Summary:


Manifest V2 extensions won’t run in Chrome in some time in 2024.

https://developer.chrome.com/docs/extensions/mv3/mv2-sunset/

According to https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/manifest_version no browser except Chrome supports V3. Not sure what one’s supposed to do. Update: Firefox 109 supports v3.

This article gives some clues: https://discourse.mozilla.org/t/when-will-web-ext-support-manifest-v3/91514/5. Sounds boring.

Found a checklist: https://developer.chrome.com/docs/extensions/mv3/mv3-migration-checklist/

Might be able to piggy-back on learnings from https://github.com/refined-github/refined-github/issues/5531

web-ext now has --firefox-preview for trying experimental manifest v3 support: https://github.com/mozilla/web-ext/releases/tag/7.1.0

Update: Newer blog post from Mozilla: https://blog.mozilla.org/addons/2022/10/31/begin-your-mv3-migration-by-implementing-new-features-today/

lydell commented 3 months ago

Chrome now shows this:

image

I don’t use Chrome regularly myself, and as is evident in this issue tracker I don’t have much time for Link Hints, so unfortunately Link Hints might stop working for Chrome soon :(

It should be possible to convert to manifest version 3 though, it’s mostly a question about time. (Time investigating how to adapt Link Hints, and doing the actual work.)

lydell commented 2 months ago

I have now began work on this in the mv3 branch.

Plan:

meldron commented 2 months ago

It is now no longer possible to install the Extension from the chrome store. May be you could add a packed extension for Chrome in the Repo releases.

lydell commented 2 months ago

@meldron Can I read more about “packaged extensions” somewhere?

meldron commented 2 months ago

Hey @lydell, sorry I meant a zip file containing a directory with the "unpacked extensions".

Unpacked extensions are a directory containing the extension, including a manifest.json file.

So that people can download the zip file. Unpack it and use the developer options to load the extension on chrome://extensions/:

image

meldron commented 2 months ago

So more or less just the output of npm run build:chrome: dist-chrome/link_hints-1.3.2.zip. Just tested it and works for me.

So may be creating a Github Aciton and a release and run all the build: commands and add the zip files?