diff --git a/options/sanitationRules.js b/options/sanitationRules.js index cc90a7c..3d0b275 100644 --- a/options/sanitationRules.js +++ b/options/sanitationRules.js @@ -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); } }, ] diff --git a/releaseNotes.txt b/releaseNotes.txt index a2f01ab..fe0f657 100644 --- a/releaseNotes.txt +++ b/releaseNotes.txt @@ -7,6 +7,7 @@ Version 0.5.15: fixes: - background color of the textarea in the settings export was not readable in the dark theme when the value was invalid + - settings sanitation: added missing APIs known issues: - if a data URL is blocked the page action button does not appear