-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate.index.html
58 lines (49 loc) · 2.13 KB
/
update.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Jedi Knight Galaxies - Updates</title>
<meta charset="utf-8">
<meta name="Description" content="Jedi Knight Galaxies, version check.">
<link rel="icon" href="images/JKG_logo-inverted.ico" type="image/x-icon">
<link rel="apple-touch-icon-precomposed" href="images/JKG_logo-inverted.png">
<link rel="icon" type="image/png" href="images/JKG_logo-inverted-64x64.png" sizes="64x64">
<link rel="icon" type="image/png" href="images/JKG_logo-inverted-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="images/JKG_logo-inverted-16x16.png" sizes="16x16">
<meta name="msapplication-TileColor" content="#010412">
<meta name="msapplication-TileImage" content="images/JKG_logo-inverted-144x144.png">
<link rel="stylesheet" href="styles.css">
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
<script type="text/javascript">
window.jQuery || document.write('\x3Cscript type="text/javascript" src="scripts/jquery-3.7.1.min.js">\x3C/script>');
</script>
<script type="text/javascript">
window.onload = function ()
{
loadVersionText();
}
function loadVersionText()
{
$.getJSON("https://api.github.com/repos/JKGDevs/JediKnightGalaxies/releases/latest").done(function (json)
{
var release = json; //set release equal to json
var version = release.tag_name; //which version the tag is
version = version.replace("Version", "v");
document.getElementById("version").innerHTML = version;
if(navigator.userAgent.indexOf("JKGLauncher") != -1 )
{
/*do special launcher stuff*/
}
else
{
alert("The latest version of JKG is: " + version);
}
});
}
</script>
</head>
<body>
<div>
<p id="version"></p>
</div>
</body>
</html>