1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 12:50:36 +01:00

Added internal type handling for getContext.

Fixes #86
This commit is contained in:
kkapsner 2016-11-13 14:55:42 +01:00
parent e4c65d415e
commit b2823cbd8d

View File

@ -79,11 +79,24 @@
exports.changedFunctions = {
getContext: {
getStatus: function(obj, status){
return {
mode: hasType(status, "block")? "block": "fake",
type: status.type,
active: true
};
if (hasType(status, "internal")){
return {
mode: "allow",
type: status.type,
active: false
}
}
else if (hasType(status, "context") || hasType(status, "input")){
return {
mode: (status.mode === "block")? "block": "fake",
type: status.type,
active: true
};
}
else {
status.active = false;
return status;
}
},
object: "HTMLCanvasElement",
fakeGenerator: function(prefs, notify){