X-Git-Url: http://git.datanom.net/qtadmin.git/blobdiff_plain/c5c78f09920bdf0c92e83ea97418b04dc046d9ec..0f9549a5088b1a76553e8af3f2ae14afb2a5e3c9:/js/timer.js diff --git a/js/timer.js b/js/timer.js index 4825655..f68f084 100644 --- a/js/timer.js +++ b/js/timer.js @@ -13,7 +13,7 @@ function myTimer() { console.log('Session expired, reload page'); last = -1; location.reload(); - } else if (timeLeft < 2) { + } else if (timeLeft == 1) { if (timeLeft < last || last == -1) { last = timeLeft; timeLeft = '< ' + timeLeft + ' min'; @@ -22,7 +22,7 @@ function myTimer() { document.getElementById("timer").innerHTML = timeLeft; } } else { - if (timeLeft < last || last == -1) { + if ((timeLeft < last && timeLeft > 0) || last == -1) { last = timeLeft; console.log('Session valid < ' + timeLeft); timeLeft = '< ' + timeLeft + ' min';