alert in private cookieless mode
This commit is contained in:
parent
320d612ee0
commit
680d6ed1b2
2 changed files with 14 additions and 4 deletions
|
|
@ -20,8 +20,13 @@
|
||||||
SETUP = parseOpt(LOC.search.substring(1)),
|
SETUP = parseOpt(LOC.search.substring(1)),
|
||||||
SECURE = isSecure(LOC.protocol),
|
SECURE = isSecure(LOC.protocol),
|
||||||
LOCAL = self.debug && !SETUP.remote,
|
LOCAL = self.debug && !SETUP.remote,
|
||||||
SDB = MOTO.KV,
|
SDB = MOTO.KV;
|
||||||
ODB = KIRI.odb = new MOTO.Storage(SETUP.d ? SETUP.d[0] : 'kiri'),
|
|
||||||
|
if (SDB.isLocal()) {
|
||||||
|
alert(SDB.getItem("__local__"));
|
||||||
|
}
|
||||||
|
|
||||||
|
let ODB = KIRI.odb = new MOTO.Storage(SETUP.d ? SETUP.d[0] : 'kiri'),
|
||||||
SPACE = KIRI.space = MOTO.Space,
|
SPACE = KIRI.space = MOTO.Space,
|
||||||
WIDGETS = KIRI.widgets = [],
|
WIDGETS = KIRI.widgets = [],
|
||||||
CATALOG = KIRI.catalog = KIRI.openCatalog(ODB,autoDecimate),
|
CATALOG = KIRI.catalog = KIRI.openCatalog(ODB,autoDecimate),
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,9 @@
|
||||||
self.moto.KV.setItem('__test', 1);
|
self.moto.KV.setItem('__test', 1);
|
||||||
self.moto.KV.getItem('__test');
|
self.moto.KV.getItem('__test');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log("in private browsing mode or 3rd party storage blocked. some settings will be lost.");
|
|
||||||
self.moto.KV = new KV();
|
self.moto.KV = new KV();
|
||||||
|
kv.setItem("__local__", "in private browsing mode or 3rd party storage blocked. application may not function.");
|
||||||
|
console.log(kv.getItem("__local__"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -51,4 +52,8 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
KP.isLocal = function() {
|
||||||
|
return this.getItem("__local__");
|
||||||
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue