From 255c8e6bbfe1b3a142710335c4782b630c15af06 Mon Sep 17 00:00:00 2001 From: kkapsner Date: Sat, 8 Sep 2018 00:05:56 +0200 Subject: [PATCH] DOMRect did not work because of protectedAPIFeatures --- lib/intercept.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/intercept.js b/lib/intercept.js index 1e37ffa..64d51b3 100644 --- a/lib/intercept.js +++ b/lib/intercept.js @@ -233,8 +233,14 @@ dataURL: getDataURL(this, prefs) }); } - - if (funcStatus.active && prefs("protectedAPIFeatures")[name]){ + const protectedAPIFeatures = prefs("protectedAPIFeatures"); + if ( + funcStatus.active && + ( + !protectedAPIFeatures.hasOwnProperty(name) || + protectedAPIFeatures[name] + ) + ){ if (funcStatus.mode === "ask"){ funcStatus.mode = ask({ window: window,