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

Added screnn protection

First draft for #220
This commit is contained in:
kkapsner 2019-11-11 23:00:39 +01:00
parent cc776b48de
commit d42a4d2372
14 changed files with 532 additions and 2 deletions

View file

@ -81,6 +81,7 @@
{mainFlag: "protectWindow", section: "Window-API"},
{mainFlag: "protectDOMRect", section: "DOMRect-API"},
{mainFlag: "protectNavigator", section: "Navigator-API"},
{mainFlag: "protectScreen", section: "Screen-API"},
].forEach(function(api){
if (settings.get(api.mainFlag) !== (api.mainFlagDisabledValue || false)){
let inSection = false;
@ -297,6 +298,19 @@
}]
});
}
if (settings.protectScreen && settings.screenSize){
errorCallback({
message: extension.getTranslation("sanitation_error.customScreenSize"),
severity: "medium",
resolutions: [{
label: extension.getTranslation("sanitation_resolution.setTo")
.replace(/{value}/g, "\"\""),
callback: function(){
settings.screenSize = "";
}
}]
});
}
}
},
];