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;
|
return window.navigator;
|
||||||
});
|
});
|
||||||
newNav = new nav();
|
newNav = new nav();
|
||||||
const alreadyProxifiedNav = {
|
const primitivesNav = {
|
||||||
userAgent: window.navigator.userAgent,
|
userAgent: window.navigator.userAgent,
|
||||||
appVersion: window.navigator.appVersion,
|
appVersion: window.navigator.appVersion,
|
||||||
platform: window.navigator.platform,
|
platform: window.navigator.platform,
|
||||||
@ -12,17 +12,23 @@ const alreadyProxifiedNav = {
|
|||||||
userLanguage: window.navigator.userLanguage,
|
userLanguage: window.navigator.userLanguage,
|
||||||
language: window.navigator.language,
|
language: window.navigator.language,
|
||||||
cookieEnabled: true,
|
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) {
|
for (let prop in window.navigator) {
|
||||||
if (prop === 'brave') {
|
if (prop === 'brave') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
newNav.prop = copyNavRef.prop;
|
newNav.prop = copyNavRef.prop;
|
||||||
}
|
}
|
||||||
for (let prop in alreadyProxifiedNav) {
|
for (let prop in primitivesNav) {
|
||||||
alreadyProxifiedNav.hasOwnProperty(prop) &&
|
primitivesNav.hasOwnProperty(prop) &&
|
||||||
Object.defineProperty(newNav, prop, {
|
Object.defineProperty(newNav, prop, {
|
||||||
value: alreadyProxifiedNav[prop],
|
value: primitivesNav[prop],
|
||||||
writable: true,
|
writable: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user