-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoffline.html
56 lines (48 loc) · 1.38 KB
/
offline.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>
<!-- Responsive -->
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width,
initial-scale=1">
<meta http-equiv="X-UA-Compatible"
content="ie=edge">
<!-- Title -->
<title>PWA for xcloud</title>
<!-- Meta Tags required for
Progressive Web App -->
<meta name=
"apple-mobile-web-app-status-bar"
content="#067D06">
<meta name="theme-color"
content="#067D06">
<!-- Manifest File link -->
<link rel="manifest"
href="manifest.json">
</head>
<body text="white" style="background-color:black;">
<div id="loadingicon" style="position:absolute; width:98%; height:92%; display: flex; align-items: center; justify-content: center;">
<img src="/xcloud-pwa/icons/loading.gif" height="12%">
</div>
<div id="offlinebanner" style="position:absolute; width:96%; height:98%; display: flex; align-items: center; justify-content: center;">
<img src="/xcloud-pwa/icons/offlinebanner.png" height="53%">
</div>
<script>
isOnline();
function isOnline(cb){
var img = new Image();
img.onerror = function() {
console.log("still offline");
setTimeout(isOnline, 5000);
}
img.onload = function() {
clearTimeout(isOnline)
console.log("back online!")
location.replace("index.html");
}
img.src = "https://www.xbox.com/favicon.ico";
};
</script>
</body>
</html>