Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function detectPrivateMode(n) {
- var e;
- if (window.webkitRequestFileSystem) window.webkitRequestFileSystem(window.TEMPORARY, 1, function () {
- e = !1
- }, function (n) {
- e = !0
- });
- else if (window.indexedDB && /Firefox/.test(window.navigator.userAgent)) {
- var i;
- try {
- i = window.indexedDB.open('test')
- } catch (n) {
- e = !0
- }
- void 0 === e && t(function () {
- return 'done' === i.readyState
- }, function (n) {
- n || (e = !i.result)
- })
- } else if (o(window.navigator.userAgent)) {
- e = !1;
- try {
- window.indexedDB || (e = !0)
- } catch (n) {
- e = !0
- }
- } else if (window.localStorage && /Safari/.test(window.navigator.userAgent)) {
- if (window.safariIncognito) e = !0;
- else try {
- window.localStorage.setItem('test', 1)
- } catch (n) {
- e = !0
- }
- void 0 === e && (e = !1, window.localStorage.removeItem('test'))
- }
- t(function () {
- return void 0 !== e
- }, function (t) {
- n(e)
- })
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement