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

PDF canvas support

This commit is contained in:
kkapsner 2014-08-04 17:02:42 +02:00
parent 3eed0d67d3
commit f185ad443b
4 changed files with 63 additions and 31 deletions

View file

@ -88,6 +88,10 @@ preferences.on("askPermission", function(){
}
workers.forEach(checkWorker);
});
preferences.on("allowPDFCanvas", function(){
workers.forEach(checkWorker);
});
pageMod.PageMod({
include: "*",
@ -100,5 +104,13 @@ pageMod.PageMod({
worker.on("detach", function(){
detachWorker(this, workers);
});
worker.port.on("isPDF", function(blocking){
if (prefs.allowPDFCanvas){
worker.port.emit("unblock");
}
else {
worker.port.emit(blocking, true);
}
});
},
});