Skip to content

Commit

Permalink
Add actual redirect with timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
axemclion authored Oct 2, 2023
1 parent 0f262cb commit 504956d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions redirect.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</head>
<body style="text-align:center">
<div id="redirect">
<h1>Redirecting to ... </h1>
<h1>Redirecting in 5 seconds to ... </h1>
<h2><span id="destination"></span></h2>
<hr />
</div>
Expand All @@ -28,7 +28,9 @@ <h2><span id="destination"></span></h2>
document.getElementById("redirect").style.display = "none";
} else {
document.getElementById("destination").innerText = redirect + window.location.search
//window.location.href = redirect + window.location.search;
window.setTimeout(function() {
window.location.href = redirect + window.location.search;
}, 5000)
}
document.getElementById("set_redirect").addEventListener("click", function() {
redirect = window.prompt("Redirect URL", redirect)
Expand Down

0 comments on commit 504956d

Please sign in to comment.