JSFiddle - React, Tailwind, and code Playground

by Dörnesz Tamás

HTML

<h1>Checks if you are in incognito mode</h1>
<div id="result"></div>

JavaScript

function main() {
  var fs = window.RequestFileSystem || window.webkitRequestFileSystem;
  if (!fs) {
    result.textContent = "check failed?";
    return;
  }
  fs(window.TEMPORARY, 100, function(fs) {
    result.textContent = "it does not seem like you are in incognito mode";
  }, function(err) {
    result.textContent = "it seems like you are in incognito mode";
  });
}
main();