This repository was archived by the owner on Oct 31, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatus.html
More file actions
102 lines (92 loc) · 3.15 KB
/
status.html
File metadata and controls
102 lines (92 loc) · 3.15 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!DOCTYPE html>
<html>
<head>
<title>Random Rants - Server Status</title>
</head>
<body style="font-family: arial">
<h1>Random Rants Server Status</h1>
<hr />
<b>Website:</b><span id="check_website">Loading...</span><br />
<b>User content/File storage:</b><span id="check_file">Loading...</span
><br />
<b>Chatting server:</b><span id="check_echo">Loading...</span><br />
<b>WebRTC handshake server:</b><span id="check_rtc">Loading...</span><br />
<b>Poll server:</b><span id="check_poll">Loading...</span><br/>
<b>Laser tag game & server:</b><span id="check_laser">Loading...</span>
<hr />
<b>Status information: </b>
<ul>
<li>
<span style="color: black"
>[...]:
<span style="font-weight: bold">
Checking or doing a request to this server.</span
>
</span>
</li>
<li>
<span style="color: green"
>[OK!]:
<span style="font-weight: bold">
Finished request without no issues. (Does not mean the server is not
broken)</span
>
</span>
</li>
<li>
<span style="color: yellow"
>[WARNING!]:
<span style="font-weight: bold">
Bad response, this can be a broken server, or the server was
removed. (Can possibly mean request to the server was blocked)</span
>
</span>
</li>
<li>
<span style="color: red"
>[ERROR!]:
<span style="font-weight: bold">
Your network or device is possibly blocking or doing something that
JavaScript threw an error.</span
>
</span>
</li>
</ul>
<hr />
<b
>If you are still experiencing problems, it could mean that the one of the
server's code is being currently updated or is in a currently broken
state.</b
>
<script>
async function doCheck(elmId, requestTo) {
var element = document.getElementById(elmId);
if (!element) {
return;
}
element.style.color = "black";
element.textContent = "[...]: Checking...";
try {
var response = await fetch(requestTo);
if (response.ok) {
element.style.color = "green";
element.textContent =
"[OK!]: Got ok response - server/website seems to be up!";
} else {
element.style.color = "yellow";
element.textContent = `[WARNING!]: Got a non-ok response: Status ${response.status}`;
}
} catch (e) {
element.style.color = "red";
element.textContent = `[ERROR!]: Request failed with this error: ${e}`;
}
}
doCheck("check_website", "https://randomrants.glitch.me");
doCheck("check_file", "https://randomrants-filestore-api.glitch.me");
doCheck("check_echo", "https://randomrants-ws.glitch.me");
doCheck("check_rtc", "https://randomrants-rtc.glitch.me");
doCheck("check_poll", "https://randomrants-poll.glitch.me");
doCheck("check_laser", "https://randomrants-lasertag.glitch.me/game");
</script>
</body>
</html>