mirror of
https://github.com/seiichiro0185/sailotp.git
synced 2024-11-22 07:39:42 +00:00
Also handle steam authenticator tokens on the cover
This commit is contained in:
parent
53e0f1f32b
commit
b6f105d355
1 changed files with 7 additions and 1 deletions
|
@ -41,9 +41,15 @@ CoverBackground {
|
||||||
function updateOTP() {
|
function updateOTP() {
|
||||||
// get seconds from current Date
|
// get seconds from current Date
|
||||||
var curDate = new Date();
|
var curDate = new Date();
|
||||||
|
var type;
|
||||||
|
|
||||||
if (lOTP.text == "------" || curDate.getSeconds() == 30 || curDate.getSeconds() == 0 || (curDate.getTime() - lastUpdated > 2000)) {
|
if (lOTP.text == "------" || curDate.getSeconds() == 30 || curDate.getSeconds() == 0 || (curDate.getTime() - lastUpdated > 2000)) {
|
||||||
appWin.coverOTP = OTP.calcOTP(appWin.coverSecret, "TOTP", 0);
|
if (appWin.coverTitle.substr(0,6) == "Steam:") {
|
||||||
|
type = "TOTP_STEAM"
|
||||||
|
} else {
|
||||||
|
type = "TOTP"
|
||||||
|
}
|
||||||
|
appWin.coverOTP = OTP.calcOTP(appWin.coverSecret, type, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change color of the OTP to red if less than 5 seconds left
|
// Change color of the OTP to red if less than 5 seconds left
|
||||||
|
|
Loading…
Reference in a new issue