mirror of
https://github.com/andrei0x309/Brave-Detection-Blocker-Chrome-Extension.git
synced 2024-11-22 08:03:49 +00:00
refactor: imp performance added a problematic website
This commit is contained in:
parent
fffba0ae00
commit
d0252dc0db
@ -18,9 +18,22 @@ Navigator = Navigator.bind(window.navigator);
|
|||||||
newNav = new Navigator(window.navigator);
|
newNav = new Navigator(window.navigator);
|
||||||
delete window.navigator.__proto__.brave;
|
delete window.navigator.__proto__.brave;
|
||||||
newNav.__proto__.__proto__ = window.navigator.__proto__;
|
newNav.__proto__.__proto__ = window.navigator.__proto__;
|
||||||
Object.defineProperty(window, 'navigator', {
|
|
||||||
value: newNav,
|
const websiteExceptions = ['accounts.google'];
|
||||||
writable: false,
|
|
||||||
enumerable: false,
|
const check = websiteExceptions.find((website) => {
|
||||||
configurable: false,
|
if (window.location.hostname.includes(website)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (check) {
|
||||||
|
window.navigator.brave = undefined;
|
||||||
|
} else {
|
||||||
|
Object.defineProperty(window, 'navigator', {
|
||||||
|
value: newNav,
|
||||||
|
writable: false,
|
||||||
|
enumerable: false,
|
||||||
|
configurable: false,
|
||||||
|
});
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user