diff options
Diffstat (limited to 'index.html')
-rw-r--r-- | index.html | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -6,14 +6,18 @@ <title>LARS</title> </head> <body> - Redirecting to <a href=""><span id="where"></span></a>, please wait 3s... + Redirecting to <a href=""><span id="where"></span></a>, please wait + <span id="when">3</span>s... <script charset="utf-8"> const choices = ["cool", "uncool"]; const choice = choices[Math.floor(Math.random() * choices.length)]; where.innerText = choice; - setTimeout(function () { + setTimeout(() => { window.location.replace(`${choice}/`); }, 3000); + setInterval(() => { + when.innerText = +when.innerText - 1; + }, 1000); </script> </body> </html> |