alert in private cookieless mode
This commit is contained in:
parent
320d612ee0
commit
680d6ed1b2
2 changed files with 14 additions and 4 deletions
|
|
@ -9,11 +9,12 @@
|
|||
|
||||
try {
|
||||
self.moto.KV = self.localStorage;
|
||||
self.moto.KV.setItem('__test',1);
|
||||
self.moto.KV.setItem('__test', 1);
|
||||
self.moto.KV.getItem('__test');
|
||||
} catch (e) {
|
||||
console.log("in private browsing mode or 3rd party storage blocked. some settings will be lost.");
|
||||
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