diff --git a/gulpfile.js b/gulpfile.js index 926d3e9..a3b5b3d 100755 --- a/gulpfile.js +++ b/gulpfile.js @@ -26,7 +26,7 @@ const isProduction = process.env.NODE_ENV === 'production'; const enableContributions = (process.env.ENABLE_CONTRIBUTIONS || 'true') === 'true'; -const mv3 = ['chrome'].includes(targetEnv); +const mv3 = ['chrome', 'edge', 'opera'].includes(targetEnv); const distDir = path.join(__dirname, 'dist', targetEnv); diff --git a/src/assets/manifest/edge.json b/src/assets/manifest/edge.json index 2d23fae..d03b2f1 100755 --- a/src/assets/manifest/edge.json +++ b/src/assets/manifest/edge.json @@ -1,5 +1,5 @@ { - "manifest_version": 2, + "manifest_version": 3, "name": "__MSG_extensionName__", "description": "__MSG_extensionDescription__", "version": "0.1.0", @@ -13,13 +13,18 @@ "storage", "notifications", "webRequest", - "webRequestBlocking", + "declarativeNetRequest", "webNavigation", "nativeMessaging", - "" + "offscreen", + "scripting" ], - "content_security_policy": "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src * data:; connect-src *; object-src 'none'; frame-ancestors http://127.0.0.1:*;", + "host_permissions": [""], + + "content_security_policy": { + "extension_pages": "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src * data:; connect-src *; object-src 'none'; frame-ancestors http://127.0.0.1:*;" + }, "icons": { "16": "src/assets/icons/app/icon-16.png", @@ -33,7 +38,7 @@ "128": "src/assets/icons/app/icon-128.png" }, - "browser_action": { + "action": { "default_icon": { "16": "src/assets/icons/app/icon-16.png", "19": "src/assets/icons/app/icon-19.png", @@ -47,6 +52,15 @@ } }, + "options_ui": { + "page": "src/options/index.html", + "open_in_tab": true + }, + + "background": { + "service_worker": "src/background/script.js" + }, + "content_scripts": [ { "matches": [ @@ -71,20 +85,16 @@ } ], - "options_ui": { - "page": "src/options/index.html", - "chrome_style": false, - "open_in_tab": true - }, - - "background": { - "page": "src/background/index.html" - }, - "web_accessible_resources": [ - "src/setup/index.html", - "src/scripts/reset.js", - "src/base/solver-button.css" + { + "resources": [ + "src/setup/index.html", + "src/scripts/reset.js", + "src/base/solver-button.css" + ], + "matches": ["http://*/*", "https://*/*"], + "use_dynamic_url": true + } ], "incognito": "split" diff --git a/src/assets/manifest/opera.json b/src/assets/manifest/opera.json index 40fd5b9..81cab70 100755 --- a/src/assets/manifest/opera.json +++ b/src/assets/manifest/opera.json @@ -1,5 +1,5 @@ { - "manifest_version": 2, + "manifest_version": 3, "name": "__MSG_extensionName__", "description": "__MSG_extensionDescription__", "version": "0.1.0", @@ -13,13 +13,18 @@ "storage", "notifications", "webRequest", - "webRequestBlocking", + "declarativeNetRequest", "webNavigation", "nativeMessaging", - "" + "offscreen", + "scripting" ], - "content_security_policy": "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src * data:; connect-src *; object-src 'none'; frame-ancestors http://127.0.0.1:*;", + "host_permissions": [""], + + "content_security_policy": { + "extension_pages": "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src * data:; connect-src *; object-src 'none'; frame-ancestors http://127.0.0.1:*;" + }, "icons": { "16": "src/assets/icons/app/icon-16.png", @@ -33,7 +38,7 @@ "128": "src/assets/icons/app/icon-128.png" }, - "browser_action": { + "action": { "default_icon": { "16": "src/assets/icons/app/icon-16.png", "19": "src/assets/icons/app/icon-19.png", @@ -47,6 +52,15 @@ } }, + "options_ui": { + "page": "src/options/index.html", + "open_in_tab": true + }, + + "background": { + "service_worker": "src/background/script.js" + }, + "content_scripts": [ { "matches": [ @@ -71,20 +85,16 @@ } ], - "options_ui": { - "page": "src/options/index.html", - "chrome_style": false, - "open_in_tab": true - }, - - "background": { - "page": "src/background/index.html" - }, - "web_accessible_resources": [ - "src/setup/index.html", - "src/scripts/reset.js", - "src/base/solver-button.css" + { + "resources": [ + "src/setup/index.html", + "src/scripts/reset.js", + "src/base/solver-button.css" + ], + "matches": ["http://*/*", "https://*/*"], + "use_dynamic_url": true + } ], "incognito": "split" diff --git a/webpack.config.js b/webpack.config.js index cfc22e8..fd5f8f3 100755 --- a/webpack.config.js +++ b/webpack.config.js @@ -14,7 +14,7 @@ const isProduction = process.env.NODE_ENV === 'production'; const enableContributions = (process.env.ENABLE_CONTRIBUTIONS || 'true') === 'true'; -const mv3 = ['chrome'].includes(targetEnv); +const mv3 = ['chrome', 'edge', 'opera'].includes(targetEnv); const provideExtApi = !['firefox', 'safari'].includes(targetEnv);