1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-03 03:56:26 +02:00

Added SVG protection

Fixes #589 and fixes #590
This commit is contained in:
kkapsner 2022-01-30 10:59:41 +01:00
parent 734e76180f
commit 640bd36b86
12 changed files with 84 additions and 4 deletions

View file

@ -83,6 +83,7 @@
{mainFlag: "protectAudio", section: "Audio-API"},
{mainFlag: "protectWindow", section: "Window-API"},
{mainFlag: "protectDOMRect", section: "DOMRect-API"},
{mainFlag: "protectSVG", section: "SVG-API"},
{mainFlag: "protectTextMetrics", section: "TextMetrics-API"},
{mainFlag: "protectNavigator", section: "Navigator-API"},
{mainFlag: "protectScreen", section: "Screen-API"},

View file

@ -627,6 +627,25 @@
},
]
},
{
name: "SVG-API",
settings: [
{
"name": "protectSVG"
},
{
"name": "protectedAPIFeatures",
"replaceKeyPattern": / @ .+$/,
"displayedSection": "SVG-API",
"displayDependencies": [
{
"protectSVG": [true],
"displayAdvancedSettings": [true]
}
]
},
]
},
{
name: "TextMetrics-API",
settings: [

View file

@ -61,6 +61,12 @@
whitelistValue: false,
protectedValue: true
},
{
title: extension.getTranslation("section_SVG-api"),
name: "protectSVG",
whitelistValue: false,
protectedValue: true
},
{
title: extension.getTranslation("section_navigator-api"),
name: "protectNavigator",