From 017d5c0f8a189a15f786951cb928fd0278df0611 Mon Sep 17 00:00:00 2001 From: Rob Wu Date: Wed, 17 May 2023 15:31:26 +0200 Subject: [PATCH] Apply suggestions from code review to remaining files Co-authored-by: rebloor --- dnr-block-only/manifest.json | 2 +- dnr-block-only/testpage.html | 2 +- dnr-dynamic-with-options/manifest.json | 2 +- dnr-redirect-url/popup.html | 5 ++--- dnr-redirect-url/redirectTarget.html | 2 +- examples.json | 4 ++-- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/dnr-block-only/manifest.json b/dnr-block-only/manifest.json index bd6481cc..ed039746 100644 --- a/dnr-block-only/manifest.json +++ b/dnr-block-only/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "Block only, without host_permissions", - "description": "Blocks requests to 'blocksub', 'blocktop' or 'blockall'. Due to the 'declarativeNetRequest' permission, host_permissions in manifest.json are not needed.", + "description": "Blocks requests to 'blocksub', 'blocktop', and 'blockall'. Uses the 'declarativeNetRequest' permission, meaning that host_permissions in manifest.json are not needed.", "version": "0.1", "permissions": [ "declarativeNetRequest" diff --git a/dnr-block-only/testpage.html b/dnr-block-only/testpage.html index b5558e59..02b1f54f 100644 --- a/dnr-block-only/testpage.html +++ b/dnr-block-only/testpage.html @@ -38,7 +38,7 @@

Block requests containing 'blocksub' (except main_frame)

rule 1 will not block top-level navigations to https://developer.mozilla.org/favicon.ico?blocksub - because top-level navigation ("main_frame") requests are not matched by default, + because top-level navigation ("main_frame") requests are not matched when "resourceTypes" and "excludedResourceTypes" are not specified.
diff --git a/dnr-dynamic-with-options/manifest.json b/dnr-dynamic-with-options/manifest.json index 1cc90682..bc16e834 100644 --- a/dnr-dynamic-with-options/manifest.json +++ b/dnr-dynamic-with-options/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "DNR dynamic with options", - "description": "Modify requests according to user-specifies rules in the options page.", + "description": "Modify requests according to the rules specified by the user in the options page.", "version": "0.1", "permissions": ["declarativeNetRequestWithHostAccess"], "optional_host_permissions": ["*://*/"], diff --git a/dnr-redirect-url/popup.html b/dnr-redirect-url/popup.html index 7e59ce46..ac92ca5b 100644 --- a/dnr-redirect-url/popup.html +++ b/dnr-redirect-url/popup.html @@ -8,8 +8,7 @@

Host permission requirement

To redirect requests, the extension needs host permissions.
- "Manage Extensions" (about:addons) offers a built-in UI to grant or revoke permissions.
- The permissions extension API offers the ability to build your own UI: + While "Manage Extensions" (about:addons) offers a built-in UI to grant or revoke permissions, this extension uses the permissions API to build the request into the UI:

Host permission requirement

Test cases

There are four rules in redirect-rules.json; each rule has a test case here.