From 57d883d63e9b8232e275dac7eec24f84c040dd24 Mon Sep 17 00:00:00 2001 From: hackademix Date: Wed, 15 Aug 2018 16:41:55 +0200 Subject: Policy serialization using the contentScripts API. --- src/content/webglHook.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/content/webglHook.js') diff --git a/src/content/webglHook.js b/src/content/webglHook.js index d4c064a..67f31eb 100644 --- a/src/content/webglHook.js +++ b/src/content/webglHook.js @@ -1,5 +1,6 @@ -{ - debug("WebGL Hook", document.URL, document.documentElement && document.documentElement.innerHTML); // DEV_ONLY +ns.on("perms", ns => { + debug("WebGL Hook", document.URL, document.documentElement && document.documentElement.innerHTML, ns.perms.CURRENT); // DEV_ONLY + if (ns.allows("webgl")) return; let proto = HTMLCanvasElement.prototype; let getContext = proto.getContext; exportFunction(function(type, ...rest) { @@ -23,6 +24,6 @@ return {}; } return getContext.call(this, type, ...rest); - }, proto, {defineAs: "getContext"}); - document.URL; -} + }, proto, {defineAs: "getContext"}); +}); +document.URL; -- cgit v1.2.3