mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-15 14:09:36 +02:00
Introduced maxFakeSize.
This commit is contained in:
parent
8240bf6007
commit
b8ba76300e
7 changed files with 37 additions and 23 deletions
|
@ -9,7 +9,7 @@
|
|||
var apiNames = Object.keys(changedFunctions);
|
||||
var undef;
|
||||
|
||||
exports.intercept = function intercept({subject: window}, {check, ask, notify}){
|
||||
exports.intercept = function intercept({subject: window}, {check, ask, notify, prefs}){
|
||||
apiNames.forEach(function(name){
|
||||
var changedFunction = changedFunctions[name];
|
||||
var original = window.wrappedJSObject[changedFunction.object].prototype[name];
|
||||
|
@ -35,7 +35,7 @@
|
|||
return original;
|
||||
case "fake":
|
||||
notify({url: window.location.href, errorStack: error.stack}, window);
|
||||
return changedFunction.fake || undef;
|
||||
return changedFunction.fake || changedFunction.fakeGenerator(prefs) || undef;
|
||||
//case "block":
|
||||
default:
|
||||
return undef;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue