-
Notifications
You must be signed in to change notification settings - Fork 0
/
civ5.html
64 lines (61 loc) · 1.71 KB
/
civ5.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
<!DOCTYPE html>
<html>
<head>
<title>Civ5PitbossStatus</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" type="image/png" href="logo-square.png"/>
<style>
body {
margin: 0;
}
.outer {
height: 100%;
width: 100%;
position: absolute;
text-align: center;
font-family: "Verdana", sans-serif;
font-size: 14px;
}
.container {
height: 90%;
margin-top: 10px;
}
.container img {
display: block;
max-width: 100%;
max-height: 100%;
margin: auto;
}
</style>
</head>
<body>
<div class="outer">
<div class="container">
<img src="score.jpg" alt="score"/>
<img src="timer.jpg" alt="timer"/>
<p id="text"></p>
</div>
</div>
<script>
var client = new XMLHttpRequest();
client.open('GET', '/civ5.txt');
client.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
var htmlContent = "";
responseArray = client.responseText.split(/\n/);
for (var i = 0; i < responseArray.length; i++) {
if (i == responseArray.length - 2) {
// steam url element
htmlContent += "<a href='" + responseArray[i] + "'>" + responseArray[i] + "</a>";
} else {
htmlContent += responseArray[i] + "<br>";
}
}
document.getElementById("text").innerHTML = htmlContent;
}
};
client.send();
</script>
</body>
</html>