mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 12:36:37 +02:00
parent
3722263a6f
commit
43ea01c178
3 changed files with 21 additions and 1 deletions
|
@ -71,7 +71,7 @@
|
|||
isIcon: true,
|
||||
callback: async function({domain, urls, api}){
|
||||
const whitelistingSettings = {
|
||||
all: {name: "blockMode", value: "allowEverything"},
|
||||
all: {name: "blockMode", value: "allowEverything", fakeValue: "fake"},
|
||||
canvas: {name: "protectedCanvasPart", value: "nothing"},
|
||||
audio: {name: "protectAudio", value: false},
|
||||
domRect: {name: "protectDOMRect", value: false},
|
||||
|
@ -110,6 +110,21 @@
|
|||
)];
|
||||
}
|
||||
if (choice){
|
||||
if (setting === whitelistingSettings.all && settings.get(setting.name, choice).startsWith("block")){
|
||||
setting.value = await modalChoice(
|
||||
extension.getTranslation("selectWhitelistType"),
|
||||
[
|
||||
{
|
||||
text: extension.getTranslation("blockMode_options." + setting.value),
|
||||
value: setting.value
|
||||
},
|
||||
{
|
||||
text: extension.getTranslation("blockMode_options." + setting.fakeValue),
|
||||
value: setting.fakeValue
|
||||
}
|
||||
]
|
||||
);
|
||||
}
|
||||
await settings.set(setting.name, setting.value, choice);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue