From 9800ef5140f0138e252e07d0921834dfa68f576f Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 22 May 2022 11:26:36 -0400 Subject: Add firefox-mv3 build target (#2155) --- dev/data/manifest-variants.json | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'dev') diff --git a/dev/data/manifest-variants.json b/dev/data/manifest-variants.json index 9bdfa860..419a03e3 100644 --- a/dev/data/manifest-variants.json +++ b/dev/data/manifest-variants.json @@ -267,6 +267,46 @@ "js/dom/simple-dom-parser.js", "lib/parse5.js" ] + }, + { + "name": "firefox-mv3", + "inherit": "firefox", + "fileName": "yomichan-firefox-mv3.xpi", + "modifications": [ + {"action": "set", "path": ["manifest_version"], "value": 3}, + {"action": "set", "path": ["browser_specific_settings", "gecko", "strict_min_version"], "value": "101.0"}, + {"action": "move", "path": ["browser_action"], "newPath": ["action"]}, + {"action": "delete", "path": ["background", "persistent"]}, + {"action": "move", "path": ["content_security_policy"], "newPath": ["content_security_policy_old"]}, + {"action": "set", "path": ["content_security_policy"], "value": {}}, + {"action": "move", "path": ["content_security_policy_old"], "newPath": ["content_security_policy", "extension_pages"]}, + {"action": "remove", "path": ["permissions"], "item": ""}, + {"action": "add", "path": ["permissions"], "items": ["scripting"]}, + {"action": "set", "path": ["host_permissions"], "value": [""], "after": "optional_permissions"}, + {"action": "remove", "path": ["optional_permissions"], "item": "webNavigation"}, + {"action": "move", "path": ["web_accessible_resources"], "newPath": ["web_accessible_resources_old"]}, + { + "action": "set", + "path": ["web_accessible_resources"], + "value": [ + { + "resources": [], + "matches": [ + "http://*/*", + "https://*/*", + "file://*/*" + ] + } + ], + "after": "web_accessible_resources_old" + }, + {"action": "move", "path": ["web_accessible_resources_old"], "newPath": ["web_accessible_resources", 0, "resources"]} + ], + "excludeFiles": [ + "sw.js", + "js/dom/simple-dom-parser.js", + "lib/parse5.js" + ] } ] } -- cgit v1.2.3