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

Initial Commit

This commit is contained in:
kkapsner 2014-07-31 03:05:51 +02:00
parent c8410b6536
commit 0ab4f1b7d3
7 changed files with 104 additions and 0 deletions

12
data/inject.js Normal file
View file

@ -0,0 +1,12 @@
var getContext = unsafeWindow.HTMLCanvasElement.prototype.getContext
function block(){
unsafeWindow.HTMLCanvasElement.prototype.getContext = null;
}
function unblock(){
unsafeWindow.HTMLCanvasElement.prototype.getContext = getContext;
}
self.port.on("block", block);
self.port.on("unblock", unblock);
self.port.on("detach", unblock);