Skip to content
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

Move to manifest V3 #104

Merged
merged 27 commits into from
May 31, 2023
Merged

Move to manifest V3 #104

merged 27 commits into from
May 31, 2023

Conversation

ffoodd
Copy link
Collaborator

@ffoodd ffoodd commented Jan 18, 2023

I used addons-linter to help a bit, available locally with npm run lint:ext. FWIW Mozilla's Web Extension polyfill is probably useless with Manifest V3.

Changes

  • localStorage cannot be accessed anymore, need to use chrome.storage.local() and ask for the storage permission,
  • browser_action in manifest file and browserAction API are removed: switched to action on both sides.
  • chrome.extension.getURL() is replaced with chrome.runtime.getURL()
  • reload content scripts after install, see a way on StackOverflow.

Had tons of work moving everything to the new Promise-based APIs.

Current status

  • Edge: works fine 🎉
  • Firefox requires a separate manifest.json, see below.

@Lausselloic I added quite a few npm scripts: we might want to lighten package.json a bit by moving scripts in a build/ folder, as done to inline .woff2 files or in Boosted. Would be more verbose but probably more readable, too.

@ffoodd ffoodd requested a review from Lausselloic January 18, 2023 16:13
@ffoodd ffoodd self-assigned this Jan 18, 2023
@ffoodd ffoodd force-pushed the chore/manifest-v3 branch from efa6e9b to c9a31ca Compare January 25, 2023 11:38
@ffoodd

This comment was marked as outdated.

@ffoodd ffoodd mentioned this pull request Feb 8, 2023
12 tasks
@ffoodd ffoodd force-pushed the chore/manifest-v3 branch from 8bf43b5 to b395290 Compare February 8, 2023 16:36
@ffoodd

This comment was marked as outdated.

@ffoodd

This comment was marked as outdated.

@ffoodd ffoodd marked this pull request as ready for review February 15, 2023 15:35
@ffoodd

This comment was marked as outdated.

@ffoodd

This comment was marked as outdated.

@ffoodd

This comment was marked as outdated.

@ffoodd

This comment was marked as outdated.

@ffoodd

This comment was marked as outdated.

@Lausselloic Lausselloic merged commit d0778a6 into main May 31, 2023
@ffoodd ffoodd deleted the chore/manifest-v3 branch May 31, 2023 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Activation / deactivation of the toolbar does not behave well (browser plugin)
2 participants