0
0

Removed the 5 seconds waiting time

This commit is contained in:
Bryan Pedini 2019-08-10 11:00:20 +02:00
parent 11fae05f7b
commit 8ed5a4ed9b
No known key found for this signature in database
GPG Key ID: F59032DC40EB11E0

View File

@ -32,23 +32,11 @@
<body> <body>
<center> <center>
<h1>You will be redirected to <?=$row['URL']?> in <span id="body-timeout">5</span></h1> <h1>You will be redirected to <?=$row['URL']?></h1>
</center> </center>
<script> <script>
window.onload = function() { window.onload = function() {
var seconds = 5;
function update_timeout(interval) {
document.getElementById("body-timeout").innerHTML = seconds;
if (seconds == 0) {
window.location.href = "<?=$row['URL']?>"; window.location.href = "<?=$row['URL']?>";
clearInterval(interval);
}
}
interval = setInterval(function() {
update_timeout(interval);
seconds = seconds - 1;
}, 1000);
} }
</script> </script>
</body> </body>