mirror of
https://github.com/GTNewHorizons/StructureLib.git
synced 2026-11-12 16:27:36 +00:00
Update domain, add no-cache fix
This commit is contained in:
1 parent
6b4083cc4d
commit
ab85ce3f7a
1 file changed
+3
-3
+3
-3
@@ -80,7 +80,7 @@
|
||||
document.getElementById('reload-indicator').classList.remove('hidden')
|
||||
document.getElementById('use-version').disabled = true
|
||||
document.getElementById('refresh-version').disabled = true
|
||||
fetch("https://gtnewhorizons.github.io/StructureLib/index.txt")
|
||||
fetch("https://www.gtnewhorizons.com/StructureLib/index.txt", {cache: "no-cache"})
|
||||
.then((res) => {
|
||||
if (!res.ok)
|
||||
reload_versions_fallback()
|
||||
@@ -93,7 +93,7 @@
|
||||
}
|
||||
|
||||
function reload_versions_fallback() {
|
||||
fetch("https://api.github.com/repos/GTNewHorizons/StructureLib/git/trees/gh-pages")
|
||||
fetch("https://api.github.com/repos/GTNewHorizons/StructureLib/git/trees/gh-pages", {cache: "no-cache"})
|
||||
.then((res) => {
|
||||
res.json().then((rawVersions) => {
|
||||
let versions = rawVersions['tree'].filter((e) => e['type'] === 'tree' && e['path'] !== 'feature')
|
||||
@@ -120,7 +120,7 @@
|
||||
|
||||
function set_version(version) {
|
||||
document.getElementById('current-select').value = version
|
||||
document.getElementById('frame').src = 'https://gtnewhorizons.github.io/StructureLib/' + version + '/javadoc/index.html?overview-summary.html'
|
||||
document.getElementById('frame').src = 'https://www.gtnewhorizons.com/StructureLib/' + version + '/javadoc/index.html?overview-summary.html'
|
||||
localStorage.setItem(lastUseKey, version)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user