mirror of
https://github.com/andrei0x309/Brave-Detection-Blocker-Chrome-Extension.git
synced 2024-11-22 08:03:49 +00:00
improve: website compatibility
This commit is contained in:
parent
ba9ff1d202
commit
9524d11fe8
@ -10,6 +10,7 @@ const navClones = {
|
|||||||
platform: window.navigator.platform,
|
platform: window.navigator.platform,
|
||||||
vendor: window.navigator.vendor,
|
vendor: window.navigator.vendor,
|
||||||
language: window.navigator.language,
|
language: window.navigator.language,
|
||||||
|
oscpu: window.navigator.oscpu,
|
||||||
cookieEnabled: true,
|
cookieEnabled: true,
|
||||||
appCodeName: window.navigator.appCodeName,
|
appCodeName: window.navigator.appCodeName,
|
||||||
appName: window.navigator.appName,
|
appName: window.navigator.appName,
|
||||||
@ -24,10 +25,12 @@ const navClones = {
|
|||||||
registerProtocolHandler: window.navigator.registerProtocolHandler.bind(window.navigator),
|
registerProtocolHandler: window.navigator.registerProtocolHandler.bind(window.navigator),
|
||||||
requestMediaKeySystemAccess: window.navigator.requestMediaKeySystemAccess.bind(window.navigator),
|
requestMediaKeySystemAccess: window.navigator.requestMediaKeySystemAccess.bind(window.navigator),
|
||||||
requestMIDIAccess: window.navigator.requestMIDIAccess.bind(window.navigator),
|
requestMIDIAccess: window.navigator.requestMIDIAccess.bind(window.navigator),
|
||||||
|
bluetooth: window.navigator.bluetooth.bind(window.navigator),
|
||||||
|
onLine: window.navigator.onLine,
|
||||||
};
|
};
|
||||||
|
const skipPropList = [...Object.keys(navClones), 'brave'];
|
||||||
for (let prop in window.navigator) {
|
for (let prop in window.navigator) {
|
||||||
if (prop === 'brave') {
|
if (skipPropList.includes(prop)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
newNav[prop] = copyNavRef[prop];
|
newNav[prop] = copyNavRef[prop];
|
||||||
|
Loading…
Reference in New Issue
Block a user