|
|
|
@ -26,10 +26,10 @@
|
|
|
|
|
|
|
|
|
|
var totp = new jsOTP.totp();
|
|
|
|
|
|
|
|
|
|
var ls_text = localStorage.getItem("otp");
|
|
|
|
|
function load(jsontext) {
|
|
|
|
|
var keys = [];
|
|
|
|
|
if (ls_text !== null && ls_text != "") {
|
|
|
|
|
var keys = JSON.parse(ls_text || "[]");
|
|
|
|
|
if (jsontext !== null && jsontext != "") {
|
|
|
|
|
var keys = JSON.parse(jsontext || "[]");
|
|
|
|
|
if (keys.length > 0) {
|
|
|
|
|
$("#nokeys").css("display", "none");
|
|
|
|
|
}
|
|
|
|
@ -46,6 +46,18 @@
|
|
|
|
|
+ "</div>");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var ls_text = localStorage.getItem("otp");
|
|
|
|
|
if (ls_text === null || ls_text == "") {
|
|
|
|
|
// Recover from NativeStorage
|
|
|
|
|
NativeStorage.getItem("otp", function (data) {
|
|
|
|
|
localStorage.setItem("otp");
|
|
|
|
|
load(data);
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
load(ls_text);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function refreshCountdown() {
|
|
|
|
|
var percent = ((30 - ((new Date).getSeconds() % 30)) / 30) * 100;
|
|
|
|
|