-
Notifications
You must be signed in to change notification settings - Fork 1
/
plinko_countdown.html
56 lines (54 loc) · 1.58 KB
/
plinko_countdown.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
<!DOCTYPE html>
<html>
<head>
<title>Are We Plinko Yet?</title>
<meta charset="utf-8">
<style type="text/css">
html {
margin: 0;
background: black;
color: white;
font-family: sans-serif;
padding-top: calc(50vh - 250px);
}
body {
text-align: center;
}
h1 {
font-size: 144px;
margin: 4px;
}
p {
font-size: 64px;
margin: 4px;
opacity: 0.75;
}
</style>
<script type="text/javascript">
function update() {
fetch("https://api.divi.sh/cors/get?url=https://hr.plinko.horse/plinko/waitlist?c=" + Date.now()).then(data => {
return data.json();
}).then(json => {
document.getElementById("status").innerText = json.status;
document.getElementById("signups").innerText = json.signups;
if (json.status === "Open") {
document.getElementById("status").style.color = "#57CC7F";
} else if (json.status === "Closed") {
document.getElementById("status").style.color = "#CC575D";
} else {
document.getElementById("status").style.color = "#D2990B";
}
});
}
update();
setInterval(update, 30 * 1000);
</script>
</head>
<body>
<h1 id="status">Loading...</h1>
<p>Waitlist Status</p>
<br>
<h1 id="signups">Loading...</h1>
<p>Current Sign-Ups</p>
</body>
</html>