Removed the 5 seconds waiting time
This commit is contained in:
parent
11fae05f7b
commit
8ed5a4ed9b
@ -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>
|
||||||
|
Reference in New Issue
Block a user