alert in private cookieless mode

This commit is contained in:
Stewart Allen 2020-06-13 11:56:29 -04:00
commit 680d6ed1b2
2 changed files with 14 additions and 4 deletions

View file

@ -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__");
};
})();