From 9a3745b366c5d8ce8026c46592509f60f4c45acd Mon Sep 17 00:00:00 2001 From: kkapsner Date: Thu, 28 Mar 2024 14:40:08 +0100 Subject: [PATCH] Whitelist also data URL blocking Fixes #665 --- browserAction/browserAction.js | 6 ++++++ releaseNotes.txt | 1 + 2 files changed, 7 insertions(+) diff --git a/browserAction/browserAction.js b/browserAction/browserAction.js index 901571b..5a9e101 100644 --- a/browserAction/browserAction.js +++ b/browserAction/browserAction.js @@ -36,6 +36,9 @@ if (settings.get("blockMode").startsWith("allow")){ settings.set("blockMode", "fake", currentURL.host); } + if (settings.get("blockDataURLs")){ + settingContainers.resetUrlValue("blockDataURLs", currentURL); + } const entries = lists.get("white").filter(e => e.match(currentURL)).map(e => e.value); await Promise.all([ lists.removeFrom("white", entries), @@ -44,6 +47,9 @@ } else { settings.set("blockMode", "allowEverything", currentURL.hostname); + if (settings.get("blockDataURLs")){ + settings.set("blockDataURLs", false, currentURL.hostname); + } } update(); }); diff --git a/releaseNotes.txt b/releaseNotes.txt index ef7c413..be70e8d 100644 --- a/releaseNotes.txt +++ b/releaseNotes.txt @@ -13,6 +13,7 @@ Version 1.10: - new tabs opened from within the extension did not open properly in Firefox for Android - settings reset confirmation dialog was not properly visible in Firefox for Android - reload after changing the whitelist state in the browser action has to be done without cache + - data URL blocking was not affected by when changing the whitelist state in the browser action known issues: - if a data URL is blocked the page action button does not appear