made the fake loading button be correctly toggled when entering the website

This commit is contained in:
2026-07-13 13:02:14 +02:00
parent 6704fdc438
commit 83ee87699b
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -203,8 +203,8 @@ document.addEventListener("DOMContentLoaded", async function () {
return
}
if (fakeLoading != "true") {
removeLoadingScreen(true)
if (!fakeLoading) {
removeLoadingScreen()
}
else {
setLoadingProgress("Cleaning up...")
+4 -4
View File
@@ -16,7 +16,7 @@ loadingScreenEl.innerHTML = `
</p>
<div class="encased" style="height: inherit; display: flex;">
<label class="switch" style="margin: auto;">
<input type="checkbox" name="fakeLoadingToggle" onclick="setShowLoading(this.checked)" ${localStorage["fakeLoading"] != "true" ? "" : "checked"}>
<input type="checkbox" name="fakeLoadingToggle" onclick="setShowFakeLoading(this.checked)" ${localStorage["fakeLoading"] != "false" ? "checked" : ""}>
<span class="switchDecor"></span>
</label>
</div>
@@ -38,7 +38,7 @@ async function loadTips() {
}
const fakeLoading = localStorage["fakeLoading"] || "true"
const fakeLoading = localStorage["fakeLoading"] != "false"
let selectedTip = "undefined"
@@ -94,8 +94,8 @@ function removeLoadingScreen() {
}
function setShowLoading(state) {
localStorage["fakeLoading"] = state
function setShowFakeLoading(state) {
localStorage["fakeLoading"] = state.toString()
}