mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-03 03:56:26 +02:00
Completely remove function monitoring for white listed sites.
Fixes #84.
This commit is contained in:
parent
bda00e5741
commit
fc07961c6b
2 changed files with 60 additions and 50 deletions
|
@ -94,6 +94,7 @@
|
|||
};
|
||||
}
|
||||
else {
|
||||
var status = Object.create(status);
|
||||
status.active = false;
|
||||
return status;
|
||||
}
|
||||
|
@ -109,6 +110,7 @@
|
|||
},
|
||||
toDataURL: {
|
||||
getStatus: function(obj, status){
|
||||
var status = Object.create(status);
|
||||
if (hasType(status, "input")){
|
||||
var contextType = canvasContextType.get(obj);
|
||||
status.active = contextType !== "2d";
|
||||
|
@ -129,6 +131,7 @@
|
|||
},
|
||||
toBlob: {
|
||||
getStatus: function(obj, status){
|
||||
var status = Object.create(status);
|
||||
if (hasType(status, "input")){
|
||||
var contextType = canvasContextType.get(obj);
|
||||
status.active = contextType !== "2d";
|
||||
|
@ -150,6 +153,7 @@
|
|||
},
|
||||
mozGetAsFile: {
|
||||
getStatus: function(obj, status){
|
||||
var status = Object.create(status);
|
||||
if (hasType(status, "input")){
|
||||
var contextType = canvasContextType.get(obj);
|
||||
status.active = contextType !== "2d";
|
||||
|
@ -170,6 +174,7 @@
|
|||
},
|
||||
getImageData: {
|
||||
getStatus: function(obj, status){
|
||||
var status = Object.create(status);
|
||||
if (hasType(status, "input")){
|
||||
var contextType = canvasContextType.get(obj);
|
||||
status.active = contextType !== "2d";
|
||||
|
@ -207,6 +212,7 @@
|
|||
},
|
||||
fillText: {
|
||||
getStatus: function(obj, status){
|
||||
var status = Object.create(status);
|
||||
status.active = hasType(status, "input");
|
||||
return status;
|
||||
},
|
||||
|
@ -225,6 +231,7 @@
|
|||
},
|
||||
strokeText: {
|
||||
getStatus: function(obj, status){
|
||||
var status = Object.create(status);
|
||||
status.active = hasType(status, "input");
|
||||
return status;
|
||||
},
|
||||
|
@ -243,6 +250,7 @@
|
|||
},
|
||||
readPixels: {
|
||||
getStatus: function(obj, status){
|
||||
var status = Object.create(status);
|
||||
status.active = hasType(status, "readout") || hasType(status, "input");
|
||||
return status;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue