aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpraschke <stel@comfy.monster>2023-10-25 10:48:11 +0100
committerpraschke <stel@comfy.monster>2023-10-25 10:48:11 +0100
commitc54461a97edd8d06329a3329190b18f68a1cac50 (patch)
treebe52ec0a9449998fe836b7d5e191255ae498cfa9
parentb64ca7d379e48159f98373558c339a89c01c5f6c (diff)
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.
-rw-r--r--dev/data/manifest-variants.json10
-rw-r--r--docs/permissions.md9
-rw-r--r--ext/permissions.html16
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"
],
@@ -254,15 +255,6 @@
"permissions"
],
"items": [
- "webRequest"
- ]
- },
- {
- "action": "add",
- "path": [
- "permissions"
- ],
- "items": [
"webRequestBlocking"
]
},
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)_ <br>
- Yomichan uses these permissions to ensure certain requests have valid and secure headers.
+* `webRequest` <br>
+ 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)_ <br>
+ 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 @@
</div>
</div>
</div></div>
+ <div class="settings-item"><div class="settings-item-inner">
+ <div class="settings-item-left">
+ <div class="settings-item-label"><code>webRequest</code></div>
+ <div class="settings-item-description">
+ <p>
+ Yomitan uses this permission to collect audio or create Anki notes using
+ <a href="https://ankiweb.net/shared/info/2055492159" target="_blank" rel="noopener noreferrer">AnkiConnect</a>.
+ It is also required to surface error information from failed requests.
+ </p>
+ </div>
+ </div>
+ </div></div>
<div class="settings-item" data-show-for-browser="firefox firefox-mobile"><div class="settings-item-inner">
<div class="settings-item-left">
- <div class="settings-item-label"><code>webRequest</code> and <code>webRequestBlocking</code></div>
+ <div class="settings-item-label"><code>webRequestBlocking</code></div>
<div class="settings-item-description">
<p>
- 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 <code>Origin</code> request header,
as this can be used to fingerprint browser configuration.
</p>