Skip to content

Commit

Permalink
Migrate manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
metoule committed May 23, 2024
1 parent 228b36b commit 8446cc5
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 29 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ syntax:glob
*.zip
.project
.settings
.vs
.vs
node_modules
4 changes: 4 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const config = {
"tabWidth": 2,
"useTabs": false
}
47 changes: 19 additions & 28 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__",
Expand All @@ -10,41 +10,32 @@
"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": [
{
"matches": [
"*://*.deezer.com/*"
],
"js": [
"scripts/player_listener.js",
"scripts/deezer/bootstrap.js"
]
"matches": ["*://*.deezer.com/*"],
"js": ["scripts/player_listener.js", "scripts/deezer/bootstrap.js"]
}
],
"permissions": [
"*://*.deezer.com/*",
"notifications",
"tabs",
"webNavigation"
],
"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>"
],
"permissions": ["notifications", "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": [
"scripts/deezer/player_observer.js"
{
"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');

0 comments on commit 8446cc5

Please sign in to comment.