mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 01:55:41 -04:00
Refactor code/initial tests
This commit is contained in:
@@ -12,21 +12,17 @@
|
||||
var seconds = Math.floor((difference % (1000 * 60)) / 1000);
|
||||
document.getElementById("timeLeft").innerHTML = + minutes + "m " + seconds + "s";
|
||||
showTimer();
|
||||
document.getElementById("logOutTimer").addEventListener("click", logoutByUser);
|
||||
document.getElementById("logOutTimer").addEventListener("click", logoutUser);
|
||||
document.getElementById("extendSessionTimer").addEventListener("click", extendSession);
|
||||
if (difference < 0) {
|
||||
clearInterval(x);
|
||||
closeTimer();
|
||||
redirectToSignin();
|
||||
logoutUser();
|
||||
}
|
||||
}, 1000);
|
||||
}, 60 * 1000);
|
||||
}, 25 * 60 * 1000);
|
||||
|
||||
function redirectToSignin() {
|
||||
window.location.href = '/sign-in';
|
||||
}
|
||||
|
||||
function logoutByUser() {
|
||||
function logoutUser() {
|
||||
window.location.href = '/sign-out';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user