Skip to content

Instantly share code, notes, and snippets.

@ElectroHeavenVN
Last active June 23, 2024 16:22
Show Gist options
  • Select an option

  • Save ElectroHeavenVN/115f4acaf5775af4544185ce02c36502 to your computer and use it in GitHub Desktop.

Select an option

Save ElectroHeavenVN/115f4acaf5775af4544185ce02c36502 to your computer and use it in GitHub Desktop.
Userscript bypass check ẩn danh
// ==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