mirror of
https://github.com/andrei0x309/Brave-Detection-Blocker-Chrome-Extension.git
synced 2024-11-22 08:03:49 +00:00
add: missing primitives
This commit is contained in:
parent
acf1d06f82
commit
58479281f0
@ -4,7 +4,7 @@ nav = nav.bind(function () {
|
||||
return window.navigator;
|
||||
});
|
||||
newNav = new nav();
|
||||
const alreadyProxifiedNav = {
|
||||
const primitivesNav = {
|
||||
userAgent: window.navigator.userAgent,
|
||||
appVersion: window.navigator.appVersion,
|
||||
platform: window.navigator.platform,
|
||||
@ -12,17 +12,23 @@ const alreadyProxifiedNav = {
|
||||
userLanguage: window.navigator.userLanguage,
|
||||
language: window.navigator.language,
|
||||
cookieEnabled: true,
|
||||
appCodeName: window.navigator.appCodeName,
|
||||
appName: window.navigator.appName,
|
||||
product: window.navigator.product,
|
||||
geolocation: window.navigator.geolocation,
|
||||
onLine: window.navigator.onLine,
|
||||
};
|
||||
|
||||
for (let prop in window.navigator) {
|
||||
if (prop === 'brave') {
|
||||
continue;
|
||||
}
|
||||
newNav.prop = copyNavRef.prop;
|
||||
}
|
||||
for (let prop in alreadyProxifiedNav) {
|
||||
alreadyProxifiedNav.hasOwnProperty(prop) &&
|
||||
for (let prop in primitivesNav) {
|
||||
primitivesNav.hasOwnProperty(prop) &&
|
||||
Object.defineProperty(newNav, prop, {
|
||||
value: alreadyProxifiedNav[prop],
|
||||
value: primitivesNav[prop],
|
||||
writable: true,
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user