mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 12:36:37 +02:00
Initial Commit
This commit is contained in:
parent
c8410b6536
commit
0ab4f1b7d3
7 changed files with 104 additions and 0 deletions
12
data/inject.js
Normal file
12
data/inject.js
Normal 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);
|
Loading…
Add table
Add a link
Reference in a new issue