remove hack and drop back to simple alert on storage block
This commit is contained in:
parent
a24e083ae4
commit
1abcc6935a
2 changed files with 12 additions and 15 deletions
|
|
@ -21,11 +21,7 @@
|
|||
SECURE = isSecure(LOC.protocol),
|
||||
LOCAL = self.debug && !SETUP.remote,
|
||||
SDB = MOTO.KV,
|
||||
PARA = SDB.getItem("__paranoid__");
|
||||
|
||||
if (PARA) alert(PARA);
|
||||
|
||||
let ODB = KIRI.odb = new MOTO.Storage(SETUP.d ? SETUP.d[0] : 'kiri'),
|
||||
ODB = KIRI.odb = new MOTO.Storage(SETUP.d ? SETUP.d[0] : 'kiri'),
|
||||
SPACE = KIRI.space = MOTO.Space,
|
||||
WIDGETS = KIRI.widgets = [],
|
||||
CATALOG = KIRI.catalog = KIRI.openCatalog(ODB,autoDecimate),
|
||||
|
|
|
|||
|
|
@ -7,16 +7,6 @@
|
|||
if (!self.moto) self.moto = {};
|
||||
if (self.moto.KV) return;
|
||||
|
||||
try {
|
||||
self.moto.KV = self.localStorage;
|
||||
self.moto.KV.setItem('__test', 1);
|
||||
self.moto.KV.getItem('__test');
|
||||
} catch (e) {
|
||||
let kv = self.moto.KV = new KV();
|
||||
kv.setItem("__paranoid__", "in private or restricted browsing mode. local storage blocked. application may not function.");
|
||||
console.log(kv.getItem("__paranoid__"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {String} dbname
|
||||
* @param {number} [version]
|
||||
|
|
@ -52,4 +42,15 @@
|
|||
}
|
||||
};
|
||||
|
||||
try {
|
||||
self.moto.KV = self.localStorage;
|
||||
self.moto.KV.setItem('__test', 1);
|
||||
self.moto.KV.getItem('__test');
|
||||
} catch (e) {
|
||||
self.moto.KV = new KV();
|
||||
let msg = "in private or restricted browsing mode. local storage blocked. application may not function.";
|
||||
console.log(msg);
|
||||
alert(msg);
|
||||
}
|
||||
|
||||
})();
|
||||
|
|
|
|||
Loading…
Reference in a new issue