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

Chrome Extension Manifest v3 #69

Open
MichalVasut opened this issue Mar 5, 2025 · 6 comments
Open

Chrome Extension Manifest v3 #69

MichalVasut opened this issue Mar 5, 2025 · 6 comments

Comments

@MichalVasut
Copy link

With latest update of Google Chrome (134.0.6998.35 (Official Build) (64-bit) ) the extension stopped working.

The page in extension store shows

This extension is no longer available because it doesn't follow best practices for Chrome extensions.


I'm guessing, it has something to do with Manifest v3: https://developer.chrome.com/docs/extensions/develop/migrate

@kav2k
Copy link
Collaborator

kav2k commented Mar 5, 2025

Indeed, that is the reason. Plus, it probably lacks privacy-related information in the store.
I will look into updating it this weekend.

@kav2k
Copy link
Collaborator

kav2k commented Mar 9, 2025

Because the window of opportunity to perform a migration with manifest v2 was missed, #63 not being solved in advance will mean settings will be wiped. Not a huge pain, but pain nonetheless.

@kav2k
Copy link
Collaborator

kav2k commented Mar 9, 2025

Nevermind, I can still access it in an offscreen document.

@kav2k
Copy link
Collaborator

kav2k commented Mar 9, 2025

So, it probably comes as no surprise that migrating mostly-8-years-old code to Manifest v3 is complicated.
It essentially requires a big rewrite of the code.

Bad news: it's not a coulpe-hours job.
Good news: I've started on it and intend to finish it.

Again, apologies that I missed all the deadlines on v3 migration, this work should've started at least half a year earlier.

@MichalVasut
Copy link
Author

MichalVasut commented Mar 9, 2025

Don't worry about missed deadlines, happy to hear it'll get fixed. 😉

You've just followed golden rule - when it works, don't touch it. 😅

kav2k added a commit that referenced this issue Mar 9, 2025
Enabled Manifest v3 for Firefox (not SW-based)
Switched code to modules
Switched to using webextension-polyfill
@kav2k
Copy link
Collaborator

kav2k commented Mar 9, 2025

Good start! Firefox's inability to run Webextensions in Service Workers actually gives me a good intermediate ground to experiment before I have to 100% commit to Chrome's v3 model.

Next steps:

  • Replace XMLHttpRequest code with fetch()
  • Rewrite code to use storage.local for both preferences and state information
  • Write code to migrate old preferences to new storage
  • Modernize the options page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants