mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-01-30 23:38:47 +01:00
Changed pre-intercept to block
... instead of forcing the loading of the settings with a synchonous XHR.
This commit is contained in:
parent
871199cbc3
commit
3e214ed967
@ -359,6 +359,10 @@
|
||||
"description": ""
|
||||
},
|
||||
|
||||
"preBlock": {
|
||||
"message": "API auf {url} blockiert, weil die CanvasBlocker-Einstellungen nicht rechtzeitig geladen wurden.",
|
||||
"description": ""
|
||||
},
|
||||
"fakedReadout": {
|
||||
"message": "Auslese vorgetäuscht auf {url}",
|
||||
"description": ""
|
||||
|
@ -359,6 +359,10 @@
|
||||
"description": ""
|
||||
},
|
||||
|
||||
"preBlock": {
|
||||
"message": "API blocked on {url} because CanvasBlocker-settings were not loaded in time.",
|
||||
"description": ""
|
||||
},
|
||||
"fakedReadout": {
|
||||
"message": "Faked readout on {url}",
|
||||
"description": ""
|
||||
|
@ -96,11 +96,25 @@
|
||||
enumerable: true,
|
||||
configureable: true,
|
||||
get: exportFunction(function(){
|
||||
undoPreIntercept();
|
||||
settings.forceLoad();
|
||||
doRealIntercept();
|
||||
var descriptor = Object.getOwnPropertyDescriptor(constructor.prototype, name);
|
||||
return descriptor.value || descriptor.get();
|
||||
var url = getURL(window);
|
||||
if (!url){
|
||||
return undef;
|
||||
}
|
||||
var error = new Error();
|
||||
apis.notify({
|
||||
url,
|
||||
errorStack: error.stack,
|
||||
messageId: "preBlock",
|
||||
timestamp: new Date(),
|
||||
functionName: name,
|
||||
dataURL: false
|
||||
});
|
||||
return;
|
||||
// undoPreIntercept();
|
||||
// settings.forceLoad();
|
||||
// doRealIntercept();
|
||||
// var descriptor = Object.getOwnPropertyDescriptor(constructor.prototype, name);
|
||||
// return descriptor.value || descriptor.get();
|
||||
}, window),
|
||||
set: exportFunction(function(){}, window)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user