From c54461a97edd8d06329a3329190b18f68a1cac50 Mon Sep 17 00:00:00 2001 From: praschke Date: Wed, 25 Oct 2023 10:48:11 +0100 Subject: fix: reinstate webRequest and correct the permissions docs `webRequest` is used on Chrome/MV3 to surface error information from failed requests. it was added back to the declarative path by toasted-nutbread in FooSoft/yomichan#2161, but the permissions documentation did not reflect `webRequests` continued necessity. --- dev/data/manifest-variants.json | 10 +--------- docs/permissions.md | 9 +++++++-- ext/permissions.html | 16 ++++++++++++++-- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/dev/data/manifest-variants.json b/dev/data/manifest-variants.json index 07c98b91..83140ec4 100644 --- a/dev/data/manifest-variants.json +++ b/dev/data/manifest-variants.json @@ -81,6 +81,7 @@ "clipboardWrite", "unlimitedStorage", "declarativeNetRequest", + "webRequest", "scripting", "offscreen" ], @@ -248,15 +249,6 @@ "nativeMessaging" ] }, - { - "action": "add", - "path": [ - "permissions" - ], - "items": [ - "webRequest" - ] - }, { "action": "add", "path": [ diff --git a/docs/permissions.md b/docs/permissions.md index 10046210..57f9f0b2 100644 --- a/docs/permissions.md +++ b/docs/permissions.md @@ -9,8 +9,13 @@ `unlimitedStorage` is used to help prevent web browsers from unexpectedly deleting dictionary data. -* `webRequest` and `webRequestBlocking` _(Firefox only)_
- Yomichan uses these permissions to ensure certain requests have valid and secure headers. +* `webRequest`
+ Yomichan uses this permission to collect audio or create Anki notes using + [AnkiConnect](https://ankiweb.net/shared/info/2055492159). + It is also required to surface error information from failed requests. + +* `webRequestBlocking` _(Firefox only)_
+ Yomichan uses this permission to ensure certain requests have valid and secure headers. This sometimes involves removing or changing the `Origin` request header, as this can be used to fingerprint browser configuration. diff --git a/ext/permissions.html b/ext/permissions.html index 4aaef3c1..9ede7d27 100644 --- a/ext/permissions.html +++ b/ext/permissions.html @@ -47,12 +47,24 @@ +
+
+
webRequest
+
+

+ Yomitan uses this permission to collect audio or create Anki notes using + AnkiConnect. + It is also required to surface error information from failed requests. +

+
+
+
-
webRequest and webRequestBlocking
+
webRequestBlocking

- Yomitan uses these permissions to ensure certain requests have valid and secure headers. + Yomitan uses this permission to ensure certain requests have valid and secure headers. This sometimes involves removing or changing the Origin request header, as this can be used to fingerprint browser configuration.

-- cgit v1.2.3 From d1dda1b1d0861b78a633149af3789b2ec0668693 Mon Sep 17 00:00:00 2001 From: praschke Date: Mon, 23 Oct 2023 10:53:45 +0100 Subject: exclude offscreen document files from firefox --- dev/data/manifest-variants.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dev/data/manifest-variants.json b/dev/data/manifest-variants.json index 83140ec4..c9e7cd03 100644 --- a/dev/data/manifest-variants.json +++ b/dev/data/manifest-variants.json @@ -275,6 +275,9 @@ ], "excludeFiles": [ "sw.js", + "offscreen.html", + "js/background/offscreen.js", + "js/background/offscreen-main.js", "js/dom/simple-dom-parser.js", "lib/parse5.js" ] @@ -323,6 +326,9 @@ ], "excludeFiles": [ "sw.js", + "offscreen.html", + "js/background/offscreen.js", + "js/background/offscreen-main.js", "js/dom/simple-dom-parser.js", "lib/parse5.js" ] -- cgit v1.2.3