New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate manifest v2 -> v3 #13
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rebased this on master and incorporated the suggestions. When loading the extension unpacked it seems to work and I don't see any immediate errors.
But that's clearly not the case. It's declared and defined as Edit: |
Localisation seems to work fine without
As there are no defaults in the html file, if you see the english version, it means that the localisation script was executed and works.
I've never tested importing a zip file. How do you do that? Documentation states that you should Unpacked works fine on my browsers
Don't mind, it is just a pet project 😉. Feel free to add as many commits as you like. Once merged everything will be squashed. |
Nice. Thanks for double checking it. :^]
Same here, I'm not super familiar with TS or JS but can usually manage when I need to interact with it 😆.
Whoops, I think I was mistaken. In Vivaldi (maybe Chrome as well) if you're on the extension page with developer mode enabled (have to refresh if toggling it on for the first time) you can drag the zip file into the page and it will try to load it.
Sounds good. :^] That said, it might be best to hold off until the browser/market vendors actually start requiring v3. That way the extension doesn't prematurely start excluding browsers that only support v2 at the moment. |
I added documentation to help understand the purpose of each command
Chrome 88 was released on |
0158c76 fixes the archive command and gets rid of the error you had 😉 |
Loading this extension as-is throws a warning about v2's deprecation.
This is in preparation for: https://developer.chrome.com/docs/extensions/mv3/mv2-sunset/
Following: https://developer.chrome.com/docs/extensions/mv3/mv3-migration/#man-sw
The extension's version number should probably be incremented as well.
(Either in this commit or one directly following it.)
I'm running this on Vivalid and it seems to work (when on top of #11), but otherwise this is not extensively tested.
fixes #7
fixes #16
Extra note:
It doesn't seem required, but it might be better to move
background.js
's content to another file.Then change
bacground.js
to something that looks like the (now deleted)background.html
page, except usingimportScripts
instead of<script>
tags.As-is,
background.ts
seems to import./tabs_helpers.js
anyway/explicitly so it doesn't seem to make a difference when iusing"type": "module"
.