Created
May 19, 2019 22:32
-
-
Save hamada147/def6bf98029ab7c4a392656ee560450a to your computer and use it in GitHub Desktop.
detect incognito mode (private browsing).js
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
var fs = window.RequestFileSystem || window.webkitRequestFileSystem; | |
if (fs == null || fs == undefined) { | |
console.log("check failed"); | |
} | |
fs(window.TEMPORARY, 100, function() { | |
console.log("Not in Incognito mode"); | |
}, function() { | |
console.log("In Incognito mode"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not working anymore