<script>
var keyPress = false;
var interval = null;
AJS.toInit(function() {
if (AJS.params.remoteUser != '') {
AJS.$("#noconnected").hide();
window AJS.setTimeout(function$("#connected").show(){;
// Move to the SIB HomePage.
var counter = 8;
interval = setInterval(function() {
counter--;
if (!keyPress) {
if (counter <= 0) {
clearInterval(interval);
$('#countdown').html("<p style='text-align: right;'><i><b>✔️ Redirection ongoing ...</b></i></p>");
window.location.href = "https://confluence.keringapps.com/display/SIB/Welcome+Page";
return;
} else {
$('#countdown').html("<p style='text-align: right;'><img class='emoticon emoticon-tick' src='/s/en_GB/8100/4410012ac87e845516b70bc69b6f7a893eabaa5a/_/images/icons/emoticons/check.svg' data-emoticon-name='tick' alt='tick'> You will be <strong>automatically redirected in " + counter + " seconds</strong> to the }, 8000);
}
else{
<a href='https://confluence.keringapps.com/display/SIB/Welcome+Page' rel='nofollow'>Standard Information Base</a> page.</p>");
}
} else {
clearInterval(interval);
$('#countdown').html("<p style='text-align: right;' class='animated infinite fadeIn slower'><i><b>❌ Redirection stopped : have you click or typping something ?</b></i></p>");
return;
}
}, 1000);
} else {
AJS.$("#noconnected").show();
AJS.$("#connected").hide();
}
});
$(document).keypress(function(event) {
keyPress = true;
});
$('body').on('click', function() {
keyPress = true;
});
</script> |