Changed pre-intercept to block

... instead of forcing the loading of the settings with a synchonous
XHR.
This commit is contained in:
kkapsner 2017-12-11 20:59:56 +01:00
parent 871199cbc3
commit 3e214ed967
3 changed files with 27 additions and 5 deletions

View File

@ -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": ""

View File

@ -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": ""

View File

@ -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)
}