-
Notifications
You must be signed in to change notification settings - Fork 53
/
redir.html
47 lines (39 loc) · 1.19 KB
/
redir.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
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<title>Redirect - Traveller Map</title>
<meta charset="utf-8">
<link rel="shortcut icon" href="favicon.svg">
<link rel="stylesheet" href="site.css?update=2024-07-04T17:49:03">
<meta name="viewport" content="initial-scale=1, width=device-width">
<style>
a { color: blue; }
#skip { vertical-align: middle; }
</style>
<h1>You are now leaving the Traveller Map</h1>
<div class="content">
<p>
You have clicked on a link that is taking you to an external site. If you encounter any problems, please report them to the administrator of that site.
</p>
<p>
Click here to proceed: <a id=link rel=noopener></a>
</p>
<p>
<label><input id=skip type=checkbox> Skip this notice next time</label>
</p>
</div>
<script>
const $ = s => document.querySelector(s);
const url = new URL(document.location);
const href = url.searchParams.get('href');
const site = href.split('?')[0];
$('#link').href = href;
$('#link').innerText = site;
const key = `tm_redirect_skip:${site}`;
const skip = localStorage.getItem(key) === 'true';
if (skip) {
$('#skip').checked = true;
document.location = href;
}
$('#skip').addEventListener('change', e => {
localStorage.setItem(key, String($('#skip').checked));
});
</script>