This repository has been archived on 2025-01-02. You can view files and clone it, but cannot push or open issues or pull requests.
Files
mylinks/modules/redirect/web/index.ejs

42 lines
1.2 KiB
Plaintext

<!DOCTYPE html>
<html lang="en">
<head>
<title>Automatische Weiterleitung</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
background-color: #f1f1f1;
font-family: 'Courier New', serif;
min-height: 100vh;
display: flex;
align-items: center;
}
a {
text-decoration: none;
}
span {
color: #0d6efd;
}
</style>
</head>
<body>
<div class="container">
<div class="text-center">
<h1>Automatische Weiterleitung</h1>
<p>Du wirst in <span id="time"><%= meta.timer %></span> Sekunden auf <span><%= meta.shortenUrl%></span> weitergeleitet.</p>
<a onclick="history.back()" href="#">Abbrechen</a>
</div>
</div>
</body>
<script>
let seconds = <%= meta.timer %>;
setInterval(() => {
seconds--;
document.getElementById("time").innerText = seconds;
if (seconds === 0) location.href = "<%= meta.shortenUrl %>";
}, 1000, 0);
</script>
</html>