1
0
Fork 0
mirror of https://github.com/seiichiro0185/sailotp.git synced 2024-12-22 11:42:30 +00:00

Also handle steam authenticator tokens on the cover

This commit is contained in:
Robin Appelman 2015-12-04 16:27:28 +01:00
parent 53e0f1f32b
commit b6f105d355

View file

@ -41,9 +41,15 @@ CoverBackground {
function updateOTP() {
// get seconds from current Date
var curDate = new Date();
var type;
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