mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Added separate fakeReadout option
This commit is contained in:
parent
7da2a94030
commit
74e86d5d12
6 changed files with 30 additions and 5 deletions
|
@ -133,13 +133,15 @@
|
|||
switch (status){
|
||||
case "allow":
|
||||
return original;
|
||||
case "block":
|
||||
default:
|
||||
return exportFunction(
|
||||
case "fake":
|
||||
return fakeFunction.func? exportFunction(
|
||||
fakeFunction.func,
|
||||
unsafeWindow,
|
||||
fakeFunction.exportOptions
|
||||
);
|
||||
): undef;
|
||||
case "block":
|
||||
default:
|
||||
return undef;
|
||||
}
|
||||
}, unsafeWindow)
|
||||
}
|
||||
|
@ -183,6 +185,12 @@
|
|||
blockMode.readAPI.status = "block";
|
||||
}
|
||||
});
|
||||
self.port.on("fakeReadout", function(force){
|
||||
if (force || !checkPDF("fakeReadout")){
|
||||
blockMode.getContext.status = "allow";
|
||||
blockMode.readAPI.status = "fake";
|
||||
}
|
||||
});
|
||||
self.port.on("askReadout", function(force, askOnce){
|
||||
if (force || !checkPDF("askReadout")){
|
||||
blockMode.getContext.status = "allow";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue