-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoffline.html
More file actions
37 lines (36 loc) · 841 Bytes
/
Copy pathoffline.html
File metadata and controls
37 lines (36 loc) · 841 Bytes
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Offline</title>
<style>
body {
background: #111;
color: #eee;
font-family: system-ui;
padding: 16px;
}
</style>
</head>
<body>
<h1>We can't connect to openfront.io</h1>
<h3>Please check your internet connection.</h3>
<h3>If you're online, openfront.io might be down.</h3>
<h3>We’ll automatically reconnect when you’re back online or when openfront.io is available.</h3>
<script>
async function checkOnline() {
try {
const res = await fetch('https://www.google.com/generate_204', {
method: 'GET',
cache: 'no-store'
})
if (res.status === 204) {
window.location.href = 'https://openfront.io/'
}
} catch {
}
}
setInterval(checkOnline, 5000)
</script>
</body>
</html>