Skip to content

Commit d472b0e

Browse files
committed
Update home page
Since I have a script updating the mirrored contents, I plan to make it update the direct links to artifacts on the home page, instead of making JS do it.
1 parent 887ba29 commit d472b0e

2 files changed

Lines changed: 3 additions & 70 deletions

File tree

index.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ <h3 id="olympus">Olympus - Cross-platform Everest Installer</h3>
127127
<ul>
128128
<li>
129129
<a href="https://dev.azure.com/EverestAPI/Olympus/_build/latest?definitionId=4&amp;branchName=stable" id="olympus-macos-latest-link">Download the latest autobuild.</a>
130-
<div id="olympus-macos-artifact-instructions"><strong>Click the &quot;5 published&quot; button under &quot;Related&quot;, then &quot;macos.main&quot; to download it.</strong></div>
131130
</li>
132131
<li>Unzip the zip inside of the zip.</li>
133132
<li>
@@ -157,7 +156,6 @@ <h3 id="olympus">Olympus - Cross-platform Everest Installer</h3>
157156
<ul>
158157
<li>
159158
<a href="https://dev.azure.com/EverestAPI/Olympus/_build/latest?definitionId=4&amp;branchName=stable" id="olympus-linux-latest-link">Download the latest autobuild.</a>
160-
<div id="olympus-linux-artifact-instructions"><strong>Click the &quot;5 published&quot; button under &quot;Related&quot;, then &quot;linux.main&quot; to download it.</strong></div>
161159
</li>
162160
<li>Unzip the zip inside of the zip.<br>
163161
<b>The resulting folder will be your Olympus "installation" folder.</b>
@@ -167,6 +165,7 @@ <h3 id="olympus">Olympus - Cross-platform Everest Installer</h3>
167165
Run Olympus from your applications list (or <code>olympus</code> in the folder) and hope that it works.<br>
168166
If it doesn't, here are some things to check:
169167
<ul>
168+
<li>You might need to install FUSE 2 for the bundled love2d to work. Check <a href="https://github.com/AppImage/AppImageKit/wiki/FUSE" target="_blank">this page</a> for instructions. Do <b>not</b> run <code>apt install fuse</code>!</li>
170169
<li>If the bundled love2d doesn't work and your distro provides it via the package manager, try that.</li>
171170
<li>If you are on ArchLinux, you can give <a href="https://aur.archlinux.org/packages/olympus" target="_blank">the unofficial AUR package</a> a try.</li>
172171
<li>Alternatively, you could also try out <a href='https://flathub.org/apps/io.github.everestapi.Olympus' target='_blank'>the Flathub package</a>.</li>
@@ -209,7 +208,6 @@ <h3 id="cross-platform-manual-installation">Cross-platform manual installation</
209208
<li><a href="https://dev.azure.com/EverestAPI/Everest/_build/latest?definitionId=3&amp;branchName=beta" id="latest-beta-link">beta branch</a>: best to develop your mod or to have others test your mods on, with earlier access to new features.</li>
210209
<li><a href="https://dev.azure.com/EverestAPI/Everest/_build/latest?definitionId=3&amp;branchName=dev" id="latest-dev-link">dev branch</a>: gets updated <i>very frequently</i> as development of new features goes on.</li>
211210
</ul>
212-
<div id="artifact-instructions"><strong>Click the &quot;1 published&quot; button under &quot;Related&quot;, then &quot;main&quot; to download it.</strong></div>
213211
</li>
214212
<li>Open the directory where Celeste.exe is located:
215213
<ul>

index.js

Lines changed: 2 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,4 @@
1-
(async () => {
2-
// gives the download link for a given branch once the Everest version list was fetched, or null if no build was found
3-
const getLinkForBranch = (versionList, branch) => {
4-
const matchingVersions = versionList.filter(version => version.branch === branch);
5-
6-
if (matchingVersions.length !== 0) {
7-
return matchingVersions[0];
8-
}
9-
return null;
10-
};
11-
12-
// === Fetch link to Everest
13-
14-
{
15-
// call the API mirror on this very website to retrieve the versions list
16-
const versionListFetch = await fetch("https://everestapi.github.io/updatermirror/everest_versions.json");
17-
18-
if (versionListFetch.ok) {
19-
const versionList = await versionListFetch.json();
20-
21-
const stable = getLinkForBranch(versionList, "stable").mainDownload;
22-
const beta = getLinkForBranch(versionList, "beta").mainDownload;
23-
const dev = getLinkForBranch(versionList, "dev").mainDownload;
24-
25-
// if all versions have an existing build...
26-
if (stable !== null && beta !== null && dev !== null) {
27-
// set the links to their artifacts
28-
document.getElementById("latest-stable-link").href = stable;
29-
document.getElementById("latest-beta-link").href = beta;
30-
document.getElementById("latest-dev-link").href = dev;
31-
32-
// remove the line saying "Click the '1 published' button under 'Related', then 'main' to download it." since those are now direct links.
33-
var artifactInstructions = document.getElementById("artifact-instructions");
34-
artifactInstructions.parentNode.removeChild(artifactInstructions);
35-
}
36-
}
37-
}
38-
39-
40-
// === Fetch link to Olympus
41-
42-
{
43-
// call the API mirror on this very website to retrieve the versions list
44-
const versionListFetch = await fetch("https://everestapi.github.io/updatermirror/olympus_versions.json");
45-
46-
if (versionListFetch.ok) {
47-
const versionList = await versionListFetch.json();
48-
49-
const stable = getLinkForBranch(versionList, "stable");
50-
51-
if (stable !== null) {
52-
// set the links to the latest stable
53-
document.getElementById("olympus-macos-latest-link").href = stable.macosDownload;
54-
document.getElementById("olympus-linux-latest-link").href = stable.linuxDownload;
55-
56-
// remove the line saying "Click the '5 published' button under 'Related', then '...main' to download it." since those are now direct links.
57-
const artifactInstructionsMacOS = document.getElementById("olympus-macos-artifact-instructions");
58-
artifactInstructionsMacOS.parentNode.removeChild(artifactInstructionsMacOS);
59-
const artifactInstructionsLinux = document.getElementById("olympus-linux-artifact-instructions");
60-
artifactInstructionsLinux.parentNode.removeChild(artifactInstructionsLinux);
61-
}
62-
}
63-
}
64-
})();
65-
66-
{
1+
(() => {
672
// handling for the macOS instructions foldable section
683
const fold = document.getElementById("mac-instructions-fold");
694
const icon = document.getElementById("mac-instructions-fold-icon");
@@ -90,4 +25,4 @@
9025

9126
// the section is unfolded by default in the HTML, but we want it folded by default if JS is enabled
9227
toggle();
93-
}
28+
})();

0 commit comments

Comments
 (0)