if (navigator.webdriver === true) {
PropertyModifier.spoofProperty(Navigator.prototype, 'webdriver', false);
}
PropertyModifier.spoofProperty(Navigator.prototype, 'platform', "{{NAVIGATOR_PLATFORM}}");
PropertyModifier.spoofProperty(Navigator.prototype, 'hardwareConcurrency', {{HARDWARE_CONCURRENCY}});
PropertyModifier.spoofProperty(Navigator.prototype, 'deviceMemory', {{MEMORY}});
(function () {
var vendor = "{{WEBGL_VENDOR}}";
var renderer = "{{WEBGL_RENDERER}}";
function hook(target) {
if (typeof target === 'undefined' || !target) return;
PropertyModifier.spoofMethod(target.prototype, 'getParameter', function (orig) {
return function getParameter(parameter) {
var real = orig.apply(this, arguments);
if (parameter !== 37445 && parameter !== 37446) return real;
if (real === null || real === undefined) return real;
return parameter === 37445 ? vendor : renderer;
};
});
}
hook(typeof WebGLRenderingContext !== 'undefined' ? WebGLRenderingContext : null);
hook(typeof WebGL2RenderingContext !== 'undefined' ? WebGL2RenderingContext : null);
})();
{{HISTORY_BLOCK}}
(function () {
if (typeof BatteryManager === 'undefined') return;
PropertyModifier.spoofProperty(BatteryManager.prototype, 'charging', {{CHARGING}});
PropertyModifier.spoofProperty(BatteryManager.prototype, 'chargingTime', {{CHARGING_TIME}});
PropertyModifier.spoofProperty(BatteryManager.prototype, 'dischargingTime', {{DISCHARGING_TIME}});
PropertyModifier.spoofProperty(BatteryManager.prototype, 'level', {{BATTERY_PERCENTAGE}} / 100);
})();
// Browser-specific overrides
{{BROWSER_BLOCK}}