-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
82 lines (81 loc) · 3.86 KB
/
index.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html lang="en" prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8" />
<meta name="description" content="Is the tube on strike?">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@shutdownscanner">
<meta name="twitter:title" content="Is the tube on strike?">
<meta name="twitter:description" content="Is the tube on strike?" />
<meta property="og:title" content="Is the tube on strike?" />
<meta property="og:type" content="website" />
<meta property="og:description" content="Is the tube on strike?" />
<meta property="og:url" content="https://isthetubeonstrike.com" />
<meta property="og:image" content="icons/android-icon-192x192.png">
<link rel="apple-touch-icon" sizes="57x57" href="icons/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="icons/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="icons/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="icons/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="icons/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="icons/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="icons/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="icons/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="icons/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="icons/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="icons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon-16x16.png">
<link rel="manifest" href="manifest.json">
<link rel="image_src" href="icons/android-icon-192x192.png">
<meta name="msapplication-TileColor" content="#894E24">
<meta name="msapplication-TileImage" content="ms-icon-144x144.png">
<meta name="theme-color" content="#894E24">
<title>Is the tube on strike?</title>
<style>
body {
text-align: center;
font-family: "Comic Sans MS", sans-serif;
}
h2 {
font-weight: bold;
font-size: 120pt;
line-height: 120pt;
padding: 10px;
margin: 30px;
margin-bottom: 88px;
text-decoration: none;
color: black;
}
</style>
</head>
<body>
<h1>Is the tube on strike‽</h1>
<h2 id="shortanswer">not yet</h2>
<p><a href="https://reactube.com/">mobile-friendly status board</a></p>
<script type="text/javascript">
function update() {
var r = new XMLHttpRequest();
r.open("GET", "https://isthetubeonstrike.com/api.json", true);
r.onreadystatechange = function () {
if (r.readyState != 4 || r.status != 200) return;
var resp = JSON.parse(r.response);
if (resp.strikes && resp.strikes.length > 0) {
for (var ii = 0; ii < resp.strikes.length; ii++) {
var strike = resp.strikes[ii];
var now = new Date();
if (now > new Date(strike.start) && now < new Date(strike.end)) {
document.getElementById('shortanswer').innerHTML = 'YES!';
break;
} else {
document.getElementById('shortanswer').innerHTML = 'not yet';
}
}
}
};
r.send();
}
update();
setInterval(update, 5 * 60 * 1000);
</script>
</body>
</html>