mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Made checkStack available during interception.
This commit is contained in:
parent
d122f90655
commit
e4c65d415e
3 changed files with 27 additions and 11 deletions
|
@ -26,6 +26,18 @@
|
|||
return {type: [], mode: "allow"};
|
||||
}
|
||||
}
|
||||
function checkStack(stack){
|
||||
if (enabled){
|
||||
var status = sendSyncMessage(
|
||||
"canvasBlocker-checkStack",
|
||||
stack
|
||||
);
|
||||
return status[0];
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
function askWrapper(data){
|
||||
return ask(data, {
|
||||
_: function(token){
|
||||
|
@ -56,7 +68,7 @@
|
|||
var window = ev.target.defaultView;
|
||||
intercept(
|
||||
{subject: window},
|
||||
{check, ask: askWrapper, notify, prefs}
|
||||
{check, checkStack, ask: askWrapper, notify, prefs}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue