-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
404.html
34 lines (33 loc) · 1.08 KB
/
404.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="shortcut icon" href="./favicon.svg" type="image/x-icon" />
<title>urlmskr</title>
</head>
<body>
<script>
const baseURL =
window.location.origin +
window.location.pathname.replace(/\/[^\/]*$/, "/");
const decoded = window.location.href.replace(baseURL, "");
if (decoded.toLowerCase().endsWith("+reveal")) {
document.head.innerHTML += '<link rel="stylesheet" href="./style.css">';
document.body.innerHTML = `
<div class="reveal center">
<div>
<div class="top">This URL redirects to:</div>
<div class="destination">${window.atob(
decoded.slice(0, -7),
)}</div>
</div>
</div>
`;
} else {
window.location.replace(window.atob(decoded));
}
</script>
</body>
</html>