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

Migrate to manifest V3 #20

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Next Next commit
Migrate manifest
  • Loading branch information
metoule committed Jun 1, 2024
commit 290e75294bb35375a5f8649e727c3bcdf75e7852
27 changes: 18 additions & 9 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"manifest_version": 2,
"manifest_version": 3,
"version": "0.0.0.1",
"name": "__MSG_extName__",
"short_name": "__MSG_extShortName__",
@@ -10,13 +10,14 @@
"48": "imgs/icons/deezer_48x48.png",
"128": "imgs/icons/deezer_128x128.png"
},
"browser_action": {
"action": {
"default_icon": "imgs/icons/deezer_19x19.png",
"default_title": "__MSG_defaultTitle__"
"default_title": "__MSG_defaultTitle__",
"default_popup": "popup.html"
},
"background": {
"scripts": ["scripts/localstorage.js", "scripts/notifications.js", "scripts/background.js"],
"persistent": false
"service_worker": "scripts/service_worker.js",
"type": "module"
},
"options_page": "options.html",
"content_scripts": [
@@ -25,8 +26,16 @@
"js": ["scripts/player_listener.js", "scripts/deezer/bootstrap.js"]
}
],
"permissions": ["*://*.deezer.com/*", "notifications", "tabs", "webNavigation", "storage"],
"content_security_policy": "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' https://e-cdns-images.dzcdn.net/images/;",
"optional_permissions": ["<all_urls>"],
"web_accessible_resources": ["scripts/deezer/player_observer.js"]
"permissions": ["notifications", "storage", "tabs", "webNavigation"],
"host_permissions": ["*://*.deezer.com/*"],
"optional_host_permissions": ["*://*/*"],
"content_security_policy": {
"extension_pages": "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' https://e-cdns-images.dzcdn.net/images/;"
},
"web_accessible_resources": [
{
"resources": ["scripts/deezer/player_observer.js"],
"matches": ["*://*.deezer.com/*"]
}
]
}
2 changes: 2 additions & 0 deletions scripts/service_worker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

console.log('service worker loaded');