-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
40 lines (36 loc) · 1.09 KB
/
index.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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="head/jquery.js"></script>
<script type="text/javascript">
show_error = function() {
$('#error_text').text('If you are reading this, something has gone wrong!');
}
$.get('/sACNDocs/versions.txt', function(data) {
var success = false;
if (data) {
var lines = data.split('\n');
if (lines.length > 0) {
lines.forEach(function(line) {
line = line.trim()
if (!line) {
return;
}
line = line.split(':');
if (line.length > 1 && line[1] == 'latest') {
window.location = line[0];
success = true;
}
});
}
}
if (!success) {
show_error();
}
}, 'text').fail(show_error);
</script>
</head>
<body>
<div id="error_text"></div>
</body>
</html>