Created
December 27, 2017 04:43
-
-
Save matyasfodor/857119359db3f4820f85d42c0531a08c to your computer and use it in GitHub Desktop.
Tampermonkey script to fake incognito check
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 Incognito trick | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Prevent sites detecting if you're in incognito by calling the success callback of webkitRequestFileSystem even if it's failing. | |
// @author You | |
// @run-at document-start | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
function injectScript(script, node) { | |
var element = document.createElement('script'); | |
element.setAttribute('type', 'text/javascript'); | |
element.setAttribute('async', false); | |
element.text = script; | |
node.appendChild(element); | |
} | |
var node = document.documentElement; | |
var script = `(function(webkitRequestFileSystem) { | |
window.webkitRequestFileSystem = function(type, size, successCallback, errorCallback) { | |
webkitRequestFileSystem(type, size, successCallback, successCallback); | |
} | |
})(window.webkitRequestFileSystem);`; | |
injectScript(script, node); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sweet worked as advertised! To the last commenter I use greasemenkey on firefox. Just make a new script copy this code into a new script and off you go.
thanks