mirror of
https://github.com/seigler/seigler.github.io
synced 2025-07-28 07:46:10 +00:00
⚡ Add URL decoder/redirector, update node dependencies
This commit is contained in:
parent
982c1f6475
commit
cc1e58539a
4 changed files with 8189 additions and 724 deletions
42
src/static/redirect/index.html
Normal file
42
src/static/redirect/index.html
Normal file
|
@ -0,0 +1,42 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>URL hash redirector</title>
|
||||
<style>
|
||||
* { box-sizing: border-box; }
|
||||
html, body { margin: 0; height: 100%; }
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
background-color: #EEE;
|
||||
color: black;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Redirecting to:<br><a id="destination" href="#"></a></h1>
|
||||
</body>
|
||||
<script>
|
||||
var dest = window.location;
|
||||
var link = document.getElementById('destination');
|
||||
function redirect() {
|
||||
window.location = dest;
|
||||
}
|
||||
if (window.location.hash) {
|
||||
dest = atob(window.location.hash.substr(1)); // base64 decode URL hash
|
||||
link.href = dest;
|
||||
link.innerHTML = dest;
|
||||
window.setTimeout(redirect, 3000);
|
||||
}
|
||||
</script>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue