From afb4f9f053f893d9ead31f97ea1b3fc6d2e1953f Mon Sep 17 00:00:00 2001 From: Graham Langford <30706330+grahamlangford@users.noreply.github.com> Date: Tue, 30 Apr 2024 19:32:38 -0500 Subject: [PATCH] Fix offscreen mv2 permission (#8379) --- scripts/__snapshots__/manifest.test.js.snap | 5 ++--- scripts/manifest.mjs | 2 +- src/manifest.json | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/__snapshots__/manifest.test.js.snap b/scripts/__snapshots__/manifest.test.js.snap index 8b1e8ea04e..4fcf40c9a2 100644 --- a/scripts/__snapshots__/manifest.test.js.snap +++ b/scripts/__snapshots__/manifest.test.js.snap @@ -107,9 +107,9 @@ exports[`customizeManifest release builds beta 1`] = ` "webNavigation", "contextMenus", "alarms", - "offscreen", "devtools", "scripting", + "offscreen", "sidePanel", ], "sandbox": { @@ -255,7 +255,6 @@ exports[`customizeManifest release builds mv2 1`] = ` "contextMenus", "", "alarms", - "offscreen", ], "sandbox": { "pages": [ @@ -393,9 +392,9 @@ exports[`customizeManifest release builds mv3 1`] = ` "webNavigation", "contextMenus", "alarms", - "offscreen", "devtools", "scripting", + "offscreen", "sidePanel", ], "sandbox": { diff --git a/scripts/manifest.mjs b/scripts/manifest.mjs index 462b4bc68c..9da9bc2f0f 100644 --- a/scripts/manifest.mjs +++ b/scripts/manifest.mjs @@ -69,7 +69,7 @@ function updateManifestToV3(manifestV2) { // Extract host permissions const { permissions, origins } = normalizeManifestPermissions(manifest); - manifest.permissions = [...permissions, "scripting"]; + manifest.permissions = [...permissions, "scripting", "offscreen"]; manifest.host_permissions = origins; // Sidebar Panel open() is only available in Chrome 116+ // https://developer.chrome.com/docs/extensions/reference/api/sidePanel#method-open diff --git a/src/manifest.json b/src/manifest.json index 169991d4bc..89dad77a48 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -52,8 +52,7 @@ "webNavigation", "contextMenus", "", - "alarms", - "offscreen" + "alarms" ], "devtools_page": "devtools.html", "externally_connectable": {