Created the redirect module
This commit is contained in:
42
modules/redirect/web/index.ejs
Normal file
42
modules/redirect/web/index.ejs
Normal file
@ -0,0 +1,42 @@
|
||||
<!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>
|
Reference in New Issue
Block a user