mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-03 03:56:26 +02:00
parent
e539a893b4
commit
f75189f374
8 changed files with 224 additions and 95 deletions
|
@ -166,7 +166,7 @@
|
|||
}
|
||||
else if (hasType(status, "context") || hasType(status, "input")){
|
||||
return {
|
||||
mode: (status.mode === "block")? "block": "fake",
|
||||
mode: status.mode,
|
||||
type: status.type,
|
||||
active: true
|
||||
};
|
||||
|
@ -189,13 +189,11 @@
|
|||
type: "readout",
|
||||
getStatus: function(obj, status){
|
||||
status = Object.create(status);
|
||||
if (hasType(status, "input")){
|
||||
status.active = hasType(status, "readout");
|
||||
if (!status.active && hasType(status, "input")){
|
||||
var contextType = canvasContextType.get(obj);
|
||||
status.active = contextType !== "2d";
|
||||
}
|
||||
else {
|
||||
status.active = hasType(status, "readout");
|
||||
}
|
||||
return status;
|
||||
},
|
||||
object: "HTMLCanvasElement",
|
||||
|
@ -215,13 +213,11 @@
|
|||
type: "readout",
|
||||
getStatus: function(obj, status){
|
||||
status = Object.create(status);
|
||||
if (hasType(status, "input")){
|
||||
status.active = hasType(status, "readout");
|
||||
if (!status.active && hasType(status, "input")){
|
||||
var contextType = canvasContextType.get(obj);
|
||||
status.active = contextType !== "2d";
|
||||
}
|
||||
else {
|
||||
status.active = hasType(status, "readout");
|
||||
}
|
||||
return status;
|
||||
},
|
||||
object: "HTMLCanvasElement",
|
||||
|
@ -242,13 +238,11 @@
|
|||
type: "readout",
|
||||
getStatus: function(obj, status){
|
||||
status = Object.create(status);
|
||||
if (hasType(status, "input")){
|
||||
status.active = hasType(status, "readout");
|
||||
if (!status.active && hasType(status, "input")){
|
||||
var contextType = canvasContextType.get(obj);
|
||||
status.active = contextType !== "2d";
|
||||
}
|
||||
else {
|
||||
status.active = hasType(status, "readout");
|
||||
}
|
||||
return status;
|
||||
},
|
||||
object: "HTMLCanvasElement",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue