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 return
} }
if (fakeLoading != "true") { if (!fakeLoading) {
removeLoadingScreen(true) removeLoadingScreen()
} }
else { else {
setLoadingProgress("Cleaning up...") setLoadingProgress("Cleaning up...")
+4 -4
View File
@@ -16,7 +16,7 @@ loadingScreenEl.innerHTML = `
</p> </p>
<div class="encased" style="height: inherit; display: flex;"> <div class="encased" style="height: inherit; display: flex;">
<label class="switch" style="margin: auto;"> <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> <span class="switchDecor"></span>
</label> </label>
</div> </div>
@@ -38,7 +38,7 @@ async function loadTips() {
} }
const fakeLoading = localStorage["fakeLoading"] || "true" const fakeLoading = localStorage["fakeLoading"] != "false"
let selectedTip = "undefined" let selectedTip = "undefined"
@@ -94,8 +94,8 @@ function removeLoadingScreen() {
} }
function setShowLoading(state) { function setShowFakeLoading(state) {
localStorage["fakeLoading"] = state localStorage["fakeLoading"] = state.toString()
} }