-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
93 lines (82 loc) · 6.07 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jMonkeyEngine Javadoc</title>
<link rel="stylesheet" href="style.css">
<script>
function setLabels(latestVersion){
const cnt=document.querySelector("section");
const ps=cnt.querySelectorAll("p");
const createLabel=function(cnt,title,classes){
let label=document.createElement("span");
label.classList.add("label");
label.innerHTML=title;
if(classes){
for(let i in classes){
label.classList.add(classes[i]);
}
}
let labels=cnt.querySelector("span.labels");
if(!labels){
labels=document.createElement("span");
labels.classList.add("labels");
cnt.append(labels);
}
labels.append(label);
}
for(let i=0;i<ps.length;i++){
const a=ps[i].querySelector("a");
const tag=a.innerHTML;
// We add a "latest" label and move to the top if it is the latest version
if(tag===latestVersion){
cnt.removeChild(ps[i]);
cnt.prepend(ps[i]);
ps[i].classList.add("latest");
createLabel(ps[i],"Latest release",["latest"]);
}
// We add labels based on the -suffix
if(tag.indexOf("-alpha")!=-1){
createLabel(ps[i],"Alpha",["alpha"]);
}else if(tag.indexOf("-stable")!=-1){
createLabel(ps[i],"Stable",["stable"]);
}
}
}
// Get the last release and load the labels
window.onload=function(){
const latestReleaseUrl="https://api.github.com/repos/jMonkeyEngine/jmonkeyengine/releases/latest";
const req = new XMLHttpRequest();
req.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
const json=JSON.parse(this.responseText);
console.log("Detect latest version",json["tag_name"]);
setLabels(json["tag_name"]);
}
};
req.open("GET", latestReleaseUrl, true);
req.send();
};
</script>
</head>
<body>
<header>
<h1>jMonkeyEngine</h1><h2>javadoc</h2>
</header>
<section>
<p><a href='./v3.7.0-beta1.2.2/index.html'>v3.7.0-beta1.2.2</a></p> <p><a href='./v3.7.0-beta1.2.1/index.html'>v3.7.0-beta1.2.1</a></p> <p><a href='./v3.7.0-beta1.2/index.html'>v3.7.0-beta1.2</a></p> <p><a href='./v3.7.0-beta1.1/index.html'>v3.7.0-beta1.1</a></p> <p><a href='./v3.7.0-beta1/index.html'>v3.7.0-beta1</a></p> <p><a href='./v3.7.0-alpha3.1/index.html'>v3.7.0-alpha3.1</a></p> <p><a href='./v3.7.0-alpha3/index.html'>v3.7.0-alpha3</a></p> <p><a href='./v3.7.0-alpha2/index.html'>v3.7.0-alpha2</a></p> <p><a href='./v3.7.0-alpha1/index.html'>v3.7.0-alpha1</a></p> <p><a href='./v3.6.1-stable/index.html'>v3.6.1-stable</a></p> <p><a href='./v3.6.0-stable/index.html'>v3.6.0-stable</a></p> <p><a href='./v3.6.0-beta3/index.html'>v3.6.0-beta3</a></p> <p><a href='./v3.6.0-beta2/index.html'>v3.6.0-beta2</a></p> <p><a href='./v3.6.0-beta1/index.html'>v3.6.0-beta1</a></p> <p><a href='./v3.6.0-alpha3/index.html'>v3.6.0-alpha3</a></p> <p><a href='./v3.6.0-alpha2/index.html'>v3.6.0-alpha2</a></p> <p><a href='./v3.6.0-alpha1/index.html'>v3.6.0-alpha1</a></p> <p><a href='./v3.5.2-stable/index.html'>v3.5.2-stable</a></p> <p><a href='./v3.5.1-stable/index.html'>v3.5.1-stable</a></p> <p><a href='./v3.5.0-stable/index.html'>v3.5.0-stable</a></p> <p><a href='./v3.5.0-beta9/index.html'>v3.5.0-beta9</a></p> <p><a href='./v3.5.0-beta8/index.html'>v3.5.0-beta8</a></p> <p><a href='./v3.5.0-beta7/index.html'>v3.5.0-beta7</a></p> <p><a href='./v3.5.0-beta6/index.html'>v3.5.0-beta6</a></p> <p><a href='./v3.5.0-beta5/index.html'>v3.5.0-beta5</a></p> <p><a href='./v3.5.0-beta4/index.html'>v3.5.0-beta4</a></p> <p><a href='./v3.5.0-beta3/index.html'>v3.5.0-beta3</a></p> <p><a href='./v3.5.0-beta2/index.html'>v3.5.0-beta2</a></p> <p><a href='./v3.5.0-beta1/index.html'>v3.5.0-beta1</a></p> <p><a href='./v3.4.1-stable/index.html'>v3.4.1-stable</a></p> <p><a href='./v3.5.0-alpha1/index.html'>v3.5.0-alpha1</a></p> <p><a href='./v3.4.0-stable/index.html'>v3.4.0-stable</a></p> <p><a href='./v3.4.0-beta4/index.html'>v3.4.0-beta4</a></p> <p><a href='./v3.4.0-beta3/index.html'>v3.4.0-beta3</a></p> <p><a href='./v3.4.0-beta2/index.html'>v3.4.0-beta2</a></p> <p><a href='./v3.4.0-beta1/index.html'>v3.4.0-beta1</a></p> <p><a href='./v3.4.0-alpha7/index.html'>v3.4.0-alpha7</a></p> <p><a href='./v3.4.0-alpha6/index.html'>v3.4.0-alpha6</a></p> <p><a href='./v3.4.0-alpha5/index.html'>v3.4.0-alpha5</a></p> <p><a href='./v3.4.0-alpha4/index.html'>v3.4.0-alpha4</a></p> <p><a href='./v3.4.0-alpha3/index.html'>v3.4.0-alpha3</a></p> <p><a href='./3.4.0-alpha1/index.html'>3.4.0-alpha1</a></p> <p><a href='./v3.3.2-stable/index.html'>v3.3.2-stable</a></p> <p><a href='./v3.3.1-stable/index.html'>v3.3.1-stable</a></p> <p><a href='./v3.3.0-stable/index.html'>v3.3.0-stable</a></p> <p><a href='./v3.3.0-beta2/index.html'>v3.3.0-beta2</a></p> <p><a href='./v3.3.0-beta1/index.html'>v3.3.0-beta1</a></p> <p><a href='./v3.x/index.html'>v3.x</a></p>
</section>
<footer>
<hr />
<a href="http://jmonkeyengine.org/" target="_blank">Home</a>
|
<a href="https://hub.jmonkeyengine.org/" target="_blank">Forum</a>
|
<a href="https://jmonkeystore.com/" target="_blank">Asset Store</a>
|
<a href="https://wiki.jmonkeyengine.org/" target="_blank">Wiki</a>
|
<a href="https://github.com/jMonkeyEngine/jmonkeyengine" target="_blank">Github</a>
</footer>
</body>
</html>