Skip to content

Instantly share code, notes, and snippets.

@hamada147
Created May 19, 2019 22:32
Show Gist options
  • Save hamada147/def6bf98029ab7c4a392656ee560450a to your computer and use it in GitHub Desktop.
Save hamada147/def6bf98029ab7c4a392656ee560450a to your computer and use it in GitHub Desktop.
detect incognito mode (private browsing).js
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");
});
@eortiz-addi
Copy link

Not working anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment