Last active
June 23, 2024 16:22
-
-
Save ElectroHeavenVN/115f4acaf5775af4544185ce02c36502 to your computer and use it in GitHub Desktop.
Userscript bypass check ẩn danh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Anti incognito mode detection | |
| // @namespace https://github.com/ElectroHeavenVN/ | |
| // @run-at document-start | |
| // @version 1.0.0 | |
| // @description Bypass detectIncognito on Chromium-based browsers and Firefox | |
| // @author ElectroHeavenVN | |
| // @updateURL https://gist.github.com/ElectroHeavenVN/115f4acaf5775af4544185ce02c36502/raw/detectIncognitoBypass.user.js | |
| // @downloadURL https://gist.github.com/ElectroHeavenVN/115f4acaf5775af4544185ce02c36502/raw/detectIncognitoBypass.user.js | |
| // @include *://* | |
| // @grant none | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| function isChrome () { | |
| const v = navigator.vendor | |
| return (v !== undefined && v.indexOf('Google') === 0) | |
| } | |
| function isFirefox () { | |
| return (document.documentElement !== undefined && document.documentElement.style.MozAppearance !== undefined) | |
| } | |
| function isMSIE () { | |
| return (navigator.msSaveBlob !== undefined) | |
| } | |
| if (isChrome()) { | |
| navigator.webkitTemporaryStorage.queryUsageAndQuota = function(successCallback, errorCallback) { | |
| successCallback(0, Number.MAX_SAFE_INTEGER); | |
| } | |
| } else if (isFirefox()) { | |
| if (!navigator.serviceWorker) navigator.serviceWorker = null; | |
| } else if (isMSIE()) { | |
| if (!window.indexedDB) window.indexedDB = null; | |
| } | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment