1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-04 20:46:39 +02:00

Whitelist also data URL blocking

Fixes #665
This commit is contained in:
kkapsner 2024-03-28 14:40:08 +01:00
parent a18e3ba37d
commit 9a3745b366
2 changed files with 7 additions and 0 deletions

View file

@ -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();
});