From af47ee8d8784f9cd53952fe551d3963d6a17baf1 Mon Sep 17 00:00:00 2001 From: kkapsner Date: Wed, 22 Apr 2015 11:55:31 +0200 Subject: [PATCH] Code cleanup and removed blockAll bug blockAll did not block readout-API. This could be relevant if a user changes the setting and an open tab still holds a reference to a canvas-context. --- canvasblocker.xpi | Bin 27189 -> 27305 bytes data/inject.js | 6 +++--- lib/main.js | 17 +++++------------ lib/sharedFunctions.js | 9 +++++++++ 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/canvasblocker.xpi b/canvasblocker.xpi index 12b26bf8d3fc3e4285b6c5eec9ab6e9a3ee42139..1b7861ced47059318aaf0e6165b704bbe408937c 100644 GIT binary patch delta 6692 zcmZXZbx;&g+xD04PU&7ix|7?nYoK0YP#J=?>{!L0Dv63F%tt?pOgqLIhr) zZ|0eI-udo-?wK>^nmK=*`^(`x1+>|;5x!?eZ?owrU}ix7 zPw!^k;U+7z$yE!N=_*Fz0|0Am000-nPm={Qu1O45`_+NIEARP^t&BXuf7QkhSezL^ zSxYm}OeCvwwn+z1w$NzQX!Z_qGuQdO;RCX@GBiBK%)=npSS>EjFTNp^3)S4mDxHpf zWin3QKH9)z%ju-uAj>OgF7C|MvhQfa6Wl^<3*4oVxVz}=&CGajnnlCM8pL_@{=wm* z^_~+lnAr8*~b>(0lL4XW_ql^!LEKEAP`%(j|`uuU<^v*~?z zD{0e2e-pwZtxaP1D_D(N2xfJ!OjGNm%K5Py%x1KyunVzh<9VgR4`9ioo8lXmeJoty zsHEDWz_Oy~CNEFs%eElKiJR5e>-j(eI0B3i8Ag_dg7!#nDuJ_&Nt)5b4ZD=7~=B_pjf9-rpB;G0JB>zPFFYW~2ovC39WFW9Gp4y}vRuM$ z4y{QYM_{wiIqdZGv|Cw3+3od>7IE;&Sm3JFo;Ze$)c|_@#&WELV+gQ;Q3Z0C^8KMJ znHkooWSre8(^6oG*1$K9-{ywPZ$MgLvy}{6bI{~w;{=iv0Gb3~VfhGd%|_#0HQtGiA8!F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J9f0sOns75 z-Vd<(sk-mb3Vtd>hMH*b-f8Ehp}IbT`91ZsjhfSKwC=9XE6!23qcv#OHE$lf*uYx{ zS7o#Yr5XvaD{jsFgKsslHRov%I0mY3*=dlJ%{99bo8`)pr_eCnunLGcP-ch_et%@UxZB*mNkl`B{xck}p5flXkHyoMI<7-zpRNd>B>IEN zC~(J{sjKSV-0qsNpZLOfyIKTa)y-PGLrXE#UB+!vUnw&C& z@eN7wI%m7UBKqiE>29vKK)SAFo!RU1!SuC*;UBm5Q0LpJ{d4V}gAXIS1cGGYw{iMZ znJ85{DSx80hRb3^8^>qxvr%`*-O5b6Ub@ z|0(_#twn)UJ7G}$7hL~S{WrFRGn)PH>xd8$Gdu{AGYkB_#orVg<$nxNEYQEZ{^x2- QI5i~LnGt!-_FtL*0S0_>>i_@% diff --git a/data/inject.js b/data/inject.js index f5c6fbd..ee0495b 100644 --- a/data/inject.js +++ b/data/inject.js @@ -1,4 +1,4 @@ -/* global self, window, console, unsafeWindow, exportFunction, cloneInto */ +/* global self, window, CanvasRenderingContext2D, WebGLRenderingContext, console, unsafeWindow, exportFunction, cloneInto, checkURL, getDomainRegExpList */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ @@ -225,7 +225,7 @@ unsafeWindow, changedFunction.exportOptions ): undef; - case "block": + //case "block": default: return undef; } @@ -265,7 +265,7 @@ switch (mode){ case "block": blockMode.getContext.status = "block"; - blockMode.readAPI.status = "allow"; + blockMode.readAPI.status = "block"; break; case "ask": blockMode.getContext.status = "ask"; diff --git a/lib/main.js b/lib/main.js index a144043..a0091f5 100644 --- a/lib/main.js +++ b/lib/main.js @@ -14,7 +14,6 @@ var URL = require("sdk/url").URL; var _ = require("sdk/l10n").get; var tabUtils = require("sdk/tabs/utils"); - var windowUtils = require("sdk/window/utils"); var sharedFunctions = require("./sharedFunctions.js"); var getDomainRegExpList = sharedFunctions.getDomainRegExpList; @@ -58,7 +57,7 @@ function checkWorker(worker){ try { var mode; - var url = new URL(worker.url) + var url = new URL(worker.url); if ( (url.protocol === "about:") || (prefs.allowPDFCanvas && worker.tab.contentType.match(/\/pdf$/i)) @@ -66,7 +65,7 @@ mode = "unblock"; } else { - var mode = checkURL(url); + mode = checkURL(url); } worker.port.emit(mode, prefs.askOnlyOnce); } @@ -127,12 +126,6 @@ // display notifications worker.port.on("accessed readAPI", function(status, callingStackMsg){ - function log(title, object){ - console.log(title); - for (var name in object){ - console.log(name, object[name]); - } - } switch (status){ case "fake": @@ -181,11 +174,11 @@ } ]; - let priority = notifyBox.PRIORITY_WARNING_MEDIUM; + var priority = notifyBox.PRIORITY_WARNING_MEDIUM; notifyBox.appendNotification( message, - 'fake-readout', - 'chrome://browser/skin/Info.png', + "fake-readout", + "chrome://browser/skin/Info.png", priority, buttons ); diff --git a/lib/sharedFunctions.js b/lib/sharedFunctions.js index ad69c34..8ae3ba6 100644 --- a/lib/sharedFunctions.js +++ b/lib/sharedFunctions.js @@ -1,4 +1,11 @@ +/* global console,exports */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + function getDomainRegExpList(domainList){ + "use strict"; + var list = domainList .split(",") .map(function(entry){ @@ -38,6 +45,8 @@ function getDomainRegExpList(domainList){ } function checkURL(url, blockMode, whiteList, blackList){ + "use strict"; + var mode = "block"; switch (blockMode){ case "blockEverything":