-
Notifications
You must be signed in to change notification settings - Fork 14
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
DNM/WIP: Manifest v3 Migration (Firefox Preview) #416
Conversation
maxxcrawford
commented
Oct 13, 2022
- WIP - Manifest v3 Migration
- Update build command to use Firefox Preview
You also need to update diff --git a/src/manifest.json b/src/manifest.json
index 46f8f99..68c11cd 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -91,12 +91,17 @@
],
"web_accessible_resources": [
- "images/*.svg",
- "icons/*.svg",
- "icons/*.png",
- "fonts/Inter/*.woff2",
- "fonts/Metropolis/*.woff2",
- "*.html"
+ {
+ "resources": [
+ "images/*.svg",
+ "icons/*.svg",
+ "icons/*.png",
+ "fonts/Inter/*.woff2",
+ "fonts/Metropolis/*.woff2",
+ "*.html"
+ ],
+ "matches": ["<all_urls>"]
+ }
]
} |
src/manifest.json
Outdated
"background": { | ||
"scripts": ["js/libs/browser-polyfill.min.js", "js/background/background.js", "js/background/context-menu.js"] | ||
"service_worker": "js/background/background.js", |
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.
service worker isn't enabled on Firefox yet, what you want is an event page
2973a0d
to
0a77b57
Compare
f54571b
to
47b79ee
Compare
1d803cd
to
8944e67
Compare
Closing this PR as it has served its purpose. We can revisit the manifest file when ready to migrate. Adding a few review notes for some code changes that I'm not 100% sure why was made (by me). 😎 |
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.
Questions asked. 🤷
@@ -7,7 +7,7 @@ browser.storage.local.set({ relayApiSource: `${RELAY_SITE_ORIGIN}/api/v1` }); | |||
browser.runtime.onInstalled.addListener(async (details) => { | |||
const { firstRunShown } = await browser.storage.local.get("firstRunShown"); | |||
|
|||
if (details.reason == "update") { | |||
if (details.reason == "update" || details.reason == "install") { |
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.
question: Why?
await browser.runtime.sendMessage({ | ||
method: "storeRuntimeData", | ||
forceUpdate: true | ||
}); |
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.
Question: Why?