adapt manifest.json to v3.

This commit is contained in:
fiatjaf
2022-01-26 14:14:46 -03:00
parent 04279b2409
commit 114eccc318
2 changed files with 9 additions and 9 deletions

View File

@@ -25,7 +25,8 @@ esbuild
], ],
sourcemap: prod ? false : 'inline', sourcemap: prod ? false : 'inline',
define: { define: {
global: 'window' window: 'self',
global: 'self'
} }
}) })
.then(() => console.log('build success.')) .then(() => console.log('build success.'))

View File

@@ -3,7 +3,7 @@
"description": "Nostr Signer Extension", "description": "Nostr Signer Extension",
"version": "1.1.0", "version": "1.1.0",
"homepage_url": "https://github.com/fiatjaf/nos2x", "homepage_url": "https://github.com/fiatjaf/nos2x",
"manifest_version": 2, "manifest_version": 3,
"icons": { "icons": {
"16": "icons/16x16.png", "16": "icons/16x16.png",
"32": "icons/32x32.png", "32": "icons/32x32.png",
@@ -12,12 +12,9 @@
}, },
"options_page": "options.html", "options_page": "options.html",
"background": { "background": {
"scripts": [ "service_worker": "background.build.js"
"background.build.js"
],
"persistent": false
}, },
"browser_action": { "action": {
"default_title": "nos2x", "default_title": "nos2x",
"default_popup": "popup.html" "default_popup": "popup.html"
}, },
@@ -30,6 +27,8 @@
"permissions": [ "permissions": [
"storage" "storage"
], ],
"web_accessible_resources": ["nostr-provider.js"], "web_accessible_resources": [{
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self';" "resources": ["nostr-provider.js"],
"matches": ["https://*/*", "http://localhost:*/*"]
}]
} }