1/** 2 * 3 * detectIncognito v1.1.2 - (c) 2022 Joe Rutkowski <[email protected]> (https://github.com/Joe12387/detectIncognito) 4 * 5 **/ 6var detectIncognito=function(){return new Promise(function(e,t){var o,n,r="Unknown";function i(t){e({isPrivate:t,browserName:r})}function a(e){return e===eval.toString().length}function d(){void 0!==navigator.maxTouchPoints?function(){var e=String(Math.random());try{window.indexedDB.open(e,1).onupgradeneeded=function(t){var o,n,r=null===(o=t.target)||void 0===o?void 0:o.result;try{r.createObjectStore("test",{autoIncrement:!0}).put(new Blob),i(!1)}catch(e){var a=e;return e instanceof Error&&(a=null!==(n=e.message)&&void 0!==n?n:e),i("string"==typeof a&&/BlobURLs are not yet supported/.test(a))}finally{r.close(),window.indexedDB.deleteDatabase(e)}}}catch(e){return i(!1)}}():function(){var e=window.openDatabase,t=window.localStorage;try{e(null,null,null,null)}catch(e){return i(!0)}try{t.setItem("test","1"),t.removeItem("test")}catch(e){return i(!0)}i(!1)}()}function c(){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(e,t){var o;i(t<(void 0!==(o=window).performance&&void 0!==o.performance.memory&&void 0!==o.performance.memory.jsHeapSizeLimit?performance.memory.jsHeapSizeLimit:1073741824))},function(e){t(new Error("detectIncognito somehow failed to query storage quota: "+e.message))})}function u(){void 0!==self.Promise&&void 0!==self.Promise.allSettled?c():(0,window.webkitRequestFileSystem)(0,1,function(){i(!1)},function(){i(!0)})}void 0!==(n=navigator.vendor)&&0===n.indexOf("Apple")&&a(37)?(r="Safari",d()):function(){var e=navigator.vendor;return void 0!==e&&0===e.indexOf("Google")&&a(33)}()?(o=navigator.userAgent,r=o.match(/Chrome/)?void 0!==navigator.brave?"Brave":o.match(/Edg/)?"Edge":o.match(/OPR/)?"Opera":"Chrome":"Chromium",u()):void 0!==document.documentElement&&void 0!==document.documentElement.style.MozAppearance&&a(37)?(r="Firefox",i(void 0===navigator.serviceWorker)):void 0!==navigator.msSaveBlob&&a(39)?(r="Internet Explorer",i(void 0===window.indexedDB)):t(new Error("detectIncognito cannot determine the browser"))})};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.