You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$(document).ready(function() {
ifvisible.setIdleDuration(30);
ifvisible.idle(function(){
var msg = 'No activity detected in the last 15 seconds.';
if (auth == "true"){
msg += " You will be logged out in 15 seconds.";
}
alert("WTF");
Message('' + msg + '');
function showmsg() {
msg = ' You will be logged out in ' + count + ' seconds.';
document.getElementById("timer").innerHTML = msg;
count=count-1;
if (count <= 0) {
clearInterval(counter);
return;
}
}
var count=15;
var counter=setInterval(showmsg, 1000);
window.location.href = "./media.php";
});
})
The above code executes on page load and it shouldn't. It almost seems like .idle is set to true by default so it executes by default.
The text was updated successfully, but these errors were encountered:
$(document).ready(function() {
ifvisible.setIdleDuration(30);
ifvisible.idle(function(){
var msg = 'No activity detected in the last 15 seconds.';
if (auth == "true"){
msg += "
You will be logged out in 15 seconds.";
}
alert("WTF");
Message('' + msg + '');
function showmsg() {
msg = '
You will be logged out in ' + count + ' seconds.';
document.getElementById("timer").innerHTML = msg;
count=count-1;
if (count <= 0) {
clearInterval(counter);
return;
}
}
var count=15;
var counter=setInterval(showmsg, 1000);
window.location.href = "./media.php";
});
})
The above code executes on page load and it shouldn't. It almost seems like .idle is set to true by default so it executes by default.
The text was updated successfully, but these errors were encountered: