mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
settings sanitation: added missing APIs
This commit is contained in:
parent
320dc02941
commit
1430b89d55
2 changed files with 5 additions and 2 deletions
|
@ -76,11 +76,13 @@
|
|||
});
|
||||
}
|
||||
[
|
||||
{mainFlag: "protectedCanvasPart", mainFlagDisabledValue: "nothing", section: "Canvas-API"},
|
||||
{mainFlag: "protectAudio", section: "Audio-API"},
|
||||
{mainFlag: "protectWindow", section: "Window-API"},
|
||||
{mainFlag: "protectDOMRect", section: "DOMRect-API"},
|
||||
{mainFlag: "protectNavigator", section: "Navigator-API"},
|
||||
].forEach(function(api){
|
||||
if (settings.get(api.mainFlag)){
|
||||
if (settings.get(api.mainFlag) !== (api.mainFlagDisabledValue || false)){
|
||||
let inSection = false;
|
||||
let anyActive = false;
|
||||
if (getSectionKeys(api.section).every(function(key){
|
||||
|
@ -104,7 +106,7 @@
|
|||
{
|
||||
label: extension.getTranslation("sanitation_resolution.disableMainFlag"),
|
||||
callback: function(){
|
||||
settings.set(api.mainFlag, false);
|
||||
settings.set(api.mainFlag, api.mainFlagDisabledValue || false);
|
||||
}
|
||||
},
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue