0
0

Minor bug fixes, added URL link on redirect page.

This commit is contained in:
Bryan Pedini
2019-02-07 11:51:47 +01:00
parent 9e8f7ed464
commit 9210890eda
4 changed files with 17 additions and 11 deletions

View File

@@ -5,18 +5,22 @@
</head>
<body>
<center>
<h1 id="body-timeout">You will be redirected to ... in 5</h1>
<h1>You will be redirected to <span id="redirect-url"></span> in <span id="body-timeout">5</span></h1>
</center>
<script>
var seconds = 5;
function update_timeout () {
document.getElementById("title").innerHTML = "Redirect in "+seconds+" seconds";
document.getElementById("body-timeout").innerHTML = "You will be redirected to ... in "+seconds;
if (seconds == 0) {
window.location.href = my_location;
window.onload = function() {
var seconds = 5;
document.getElementById("redirect-url").innerHTML = my_location;
function update_timeout (interval) {
document.getElementById("title").innerHTML = "Redirect in "+seconds+" seconds";
document.getElementById("body-timeout").innerHTML = seconds;
if (seconds == 0) {
window.location.href = my_location;
clearInterval (interval);
}
}
interval = setInterval (function() {update_timeout(interval); seconds = seconds - 1;}, 1000);
}
setInterval (function() {update_timeout(); seconds = seconds - 1;}, 1000);
</script>
</body>
</html>