From 2ff4e4775176a905392ffad0af02c619831a4da3 Mon Sep 17 00:00:00 2001 From: HanYaodong Date: Sun, 25 Feb 2024 20:25:36 +0800 Subject: [PATCH] TEMP Add support for firefox --- manifest/chrome-manifest-extra.json | 11 +++++++++-- manifest/firefox-manifest-extra.json | 14 ++++++++------ manifest/manifest.json | 7 ------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/manifest/chrome-manifest-extra.json b/manifest/chrome-manifest-extra.json index b364b13d..a1ec644b 100644 --- a/manifest/chrome-manifest-extra.json +++ b/manifest/chrome-manifest-extra.json @@ -2,5 +2,12 @@ "optional_permissions": [ "declarativeContent", "webNavigation" - ] -} + ], + "optional_host_permissions": [ + "*://*/*" + ], + "background": { + "service_worker": "./js/background.js", + "type": "module" + } +} \ No newline at end of file diff --git a/manifest/firefox-manifest-extra.json b/manifest/firefox-manifest-extra.json index 9f9468bc..6176c924 100644 --- a/manifest/firefox-manifest-extra.json +++ b/manifest/firefox-manifest-extra.json @@ -8,13 +8,15 @@ "strict_min_version": "113.0" } }, + "optional_permissions": [ + "*://*/*" + ], "background": { - "persistent": false + "scripts": [ + "background.js" + ] }, - "permissions": [ - "scripting" - ], - "browser_action": { + "action": { "default_area": "navbar" } -} +} \ No newline at end of file diff --git a/manifest/manifest.json b/manifest/manifest.json index bcdcb54e..d995afc2 100644 --- a/manifest/manifest.json +++ b/manifest/manifest.json @@ -90,9 +90,6 @@ "host_permissions": [ "https://*.bilibili.com/*" ], - "optional_host_permissions": [ - "*://*/*" - ], "action": { "default_title": "SponsorBlock", "default_popup": "popup.html", @@ -140,10 +137,6 @@ } ] }, - "background": { - "service_worker": "./js/background.js", - "type": "module" - }, "icons": { "16": "icons/IconSponsorBlocker16px.png", "32": "icons/IconSponsorBlocker32px.png",