Skip to content

Commit fc9c981

Browse files
authored
fix again
1 parent b03cc6a commit fc9c981

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

index.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
43
<head>
54
<meta charset="UTF-8">
65
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -15,23 +14,20 @@
1514
.then(res => {
1615
if (!res.ok) {
1716
jsElement.innerHTML = "github api failed :("
18-
throw new Error("http error :( status: " + response.status);
17+
throw new Error("http error status: " + response.status);
1918
}
2019
return res.json();
2120
})
2221
.then(data => {
23-
data.filter(it => !it.name.includes("beta")).sort(it => it.name.split(".")[0].split("_").at(-1).substring(1))
22+
data.filter(it => !it.name.includes("beta")).map(it => it.name.split(".")[0].split("_")[1].substring(1)).sort((a, b) => a - b)
2423
pdf_url = "https://rawcdn.githack.com/Minecraft-Java-Edition-Speedrunning/rules/main/pub/pdf/" + data.at(-1).name
2524
link.href = link.innerHTML = window.location.href = pdf_url
2625
})
2726
}
2827
</script>
2928
</head>
30-
3129
<body onload="docLoad()">
3230
<p>redirecting to: <span id="js">this site requires javascript.</span> <a id="githack_link"
3331
href="https://github.com/Minecraft-Java-Edition-Speedrunning/rules"> click here for the rules repo</a>.</p>
3432
</body>
35-
36-
3733
</html>

0 commit comments

Comments
 (0)