From 22932e02cbd1fb16d0180c79a3c9b4d1790fbfda Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 26 Sep 2020 13:40:09 -0400 Subject: Browser manifest updates (#840) * Remove options_page * Remove applications entry * Update default content_security_policy * Add browser-specific build variants * Update default manifest * Increase Firefox min version to 57 --- dev/data/manifest-variants.json | 74 +++++++++++++++++++++++++++++++---------- ext/manifest.json | 9 +---- 2 files changed, 57 insertions(+), 26 deletions(-) diff --git a/dev/data/manifest-variants.json b/dev/data/manifest-variants.json index 587a41f8..36e24bad 100644 --- a/dev/data/manifest-variants.json +++ b/dev/data/manifest-variants.json @@ -62,7 +62,6 @@ } ], "minimum_chrome_version": "57.0.0.0", - "options_page": "bg/settings.html", "options_ui": { "page": "bg/settings.html", "open_in_tab": true @@ -103,28 +102,67 @@ "fg/float.html", "bg/template-renderer.html" ], - "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'", - "applications": { - "gecko": { - "id": "alex@foosoft.net", - "strict_min_version": "55.0" - } - } + "content_security_policy": "script-src 'self'; object-src 'self'" }, "variants": [ { - "name": "default", - "fileName": "yomichan.zip", - "fileCopies": [ - "yomichan.xpi" + "name": "chrome", + "fileName": "yomichan-chrome.zip" + }, + { + "name": "chrome-dev", + "fileName": "yomichan-chrome-dev.zip", + "modifications": [ + { + "action": "replace", + "path": ["name"], + "pattern": "^.*$", + "patternFlags": "", + "replacement": "$& (development build)" + }, + { + "action": "replace", + "path": ["description"], + "pattern": "^(.*)(?:\\.\\s*)?$", + "patternFlags": "", + "replacement": "$1. This is a development build; get the stable version here: https://tinyurl.com/yaatdjmp" + } + ] + }, + { + "name": "firefox", + "fileName": "yomichan-firefox.xpi", + "modifications": [ + { + "action": "remove", + "path": ["web_accessible_resources"], + "item": "bg/template-renderer.html" + }, + { + "action": "delete", + "path": ["sandbox"] + }, + { + "action": "set", + "path": ["content_security_policy"], + "value": "script-src 'self' 'unsafe-eval'; object-src 'self'" + }, + { + "action": "set", + "path": ["browser_specific_settings"], + "value": { + "gecko": { + "id": "alex@foosoft.net", + "strict_min_version": "57.0" + } + } + } ] }, { - "name": "dev", - "fileName": "yomichan-dev.zip", - "fileCopies": [ - "yomichan-dev.xpi" - ], + "name": "firefox-dev", + "inherit": "firefox", + "fileName": "yomichan-firefox-dev.xpi", "modifications": [ { "action": "replace", @@ -142,7 +180,7 @@ }, { "action": "set", - "path": ["applications", "gecko", "id"], + "path": ["browser_specific_settings", "gecko", "id"], "value": "alex.testing@foosoft.net" } ] diff --git a/ext/manifest.json b/ext/manifest.json index 59c88072..9333c5ae 100644 --- a/ext/manifest.json +++ b/ext/manifest.json @@ -61,7 +61,6 @@ } ], "minimum_chrome_version": "57.0.0.0", - "options_page": "bg/settings.html", "options_ui": { "page": "bg/settings.html", "open_in_tab": true @@ -102,11 +101,5 @@ "fg/float.html", "bg/template-renderer.html" ], - "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'", - "applications": { - "gecko": { - "id": "alex@foosoft.net", - "strict_min_version": "55.0" - } - } + "content_security_policy": "script-src 'self'; object-src 'self'" } -- cgit v1.2.3