1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-04 20:46:39 +02:00

Detection over navigator and DOMRect getters was possible

This commit is contained in:
kkapsner 2019-05-20 08:45:31 +02:00
parent 79a9034051
commit e0dda5ec0f
4 changed files with 33 additions and 13 deletions

View file

@ -20,19 +20,19 @@
objectGetters: [function(window){return window.Navigator && window.Navigator.prototype;}],
name: property,
getterGenerator: function(checker){
const temp = {
get [property](){
const temp = eval(`({
get ${property}(){
return checkerWrapper(checker, this, arguments, function(args, check){
const {prefs, notify, window, original} = check;
const originalValue = original.apply(this, window.Array.from(args));
const returnValue = navigator.getNavigatorValue(property);
const returnValue = navigator.getNavigatorValue("${property}");
if (originalValue !== returnValue){
notify("fakedNavigatorReadout");
}
return returnValue;
});
}
};
})`);
return Object.getOwnPropertyDescriptor(temp, property).get;
}
};