diff --git a/canvasblocker.xpi b/canvasblocker.xpi index 655f687..f9759d4 100644 Binary files a/canvasblocker.xpi and b/canvasblocker.xpi differ diff --git a/data/inject.js b/data/inject.js index 057dca9..d5867e5 100644 --- a/data/inject.js +++ b/data/inject.js @@ -241,6 +241,10 @@ // Communication with main.js + function checkAbout(){ + return document.location.protocol === "about:"); + } + function checkPDF(blocking){ if (document.contentType.match(/\/pdf$/i)){ self.port.emit("isPDF", blocking); @@ -250,32 +254,32 @@ } self.port.on("block", function(force){ - if (force || !checkPDF("block")){ + if (force || !checkAbout() || !checkPDF("block")){ blockMode.getContext.status = "block"; blockMode.readAPI.status = "allow"; } }); self.port.on("ask", function(force, askOnce){ - if (force || !checkPDF("askVisible")){ + if (force || !checkAbout() || !checkPDF("askVisible")){ blockMode.getContext.status = "ask"; blockMode.getContext.askStatus.askOnce = askOnce; blockMode.readAPI.status = "allow"; } }); self.port.on("blockReadout", function(force){ - if (force || !checkPDF("blockReadout")){ + if (force || !checkAbout() || !checkPDF("blockReadout")){ blockMode.getContext.status = "allow"; blockMode.readAPI.status = "block"; } }); self.port.on("fakeReadout", function(force){ - if (force || !checkPDF("fakeReadout")){ + if (force || !checkAbout() || !checkPDF("fakeReadout")){ blockMode.getContext.status = "allow"; blockMode.readAPI.status = "fake"; } }); self.port.on("askReadout", function(force, askOnce){ - if (force || !checkPDF("askReadout")){ + if (force || !checkAbout() || !checkPDF("askReadout")){ blockMode.getContext.status = "allow"; blockMode.readAPI.status = "ask"; blockMode.readAPI.askStatus.askOnce = askOnce;