mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-01-03 10:31:54 +01:00
prevent possible double faking
This commit is contained in:
parent
575df224ae
commit
66336d1b65
@ -159,6 +159,7 @@
|
||||
}
|
||||
};
|
||||
|
||||
let extensionID = browser.extension.getURL("");
|
||||
scope.intercept = function intercept({subject: window}, {check, checkStack, ask, notify, prefs}){
|
||||
var siteStatus = check({url: getURL(window)});
|
||||
logging.verbose("status for page", window, siteStatus);
|
||||
@ -189,6 +190,15 @@
|
||||
return undef;
|
||||
}
|
||||
var error = new Error();
|
||||
try {
|
||||
// return original if the extension itself requested the function
|
||||
if (error.stack.split("\n", 3)[1].split("@", 2)[1].startsWith(extensionID)){
|
||||
return original;
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
// stack had an unknown form
|
||||
}
|
||||
if (checkStack(error.stack)){
|
||||
return original;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ Version 0.4.5:
|
||||
-
|
||||
|
||||
fixes:
|
||||
-
|
||||
- prevent possible double faking
|
||||
|
||||
Version 0.4.4b:
|
||||
known issues:
|
||||
|
Loading…
x
Reference in New Issue
Block a user