diff --git a/global/globalScript.js b/global/globalScript.js index 497baa4..63e22b8 100644 --- a/global/globalScript.js +++ b/global/globalScript.js @@ -160,7 +160,7 @@ document.addEventListener("DOMContentLoaded", async function() { pauseAnimBtn(localStorage["isAnimating"] || "true") debugPrint("isAnimating", isAnimating) - if (showLoading != "true") { + if (fakeLoading != "true") { removeLoadingScreen(true) } else { diff --git a/global/loadingScreen.js b/global/loadingScreen.js index 568d9c2..92146ef 100644 --- a/global/loadingScreen.js +++ b/global/loadingScreen.js @@ -29,7 +29,7 @@ async function loadTips() { } -const showLoading = localStorage["showLoading"] || "true" +const fakeLoading = localStorage["fakeLoading"] || "true" let selectedTip = "undefined" @@ -57,6 +57,11 @@ function setLoadingProgress(newText) { function startLoadingScreen() { loadingScreenProgress.innerHTML = `Loading...

Tip: ${selectedTip}` + if (fakeLoading != "true") { + let cText = document.getElementById("loadingCornerText") + if (cText) { cText.remove() } + } + const loadDur = randomFloat(2000, 4000) debugPrint("loadDur initial", loadDur) @@ -81,7 +86,8 @@ function removeLoadingScreen(rmCornerText = false) { setTimeout(function() { loadingScreenEl.style.left = "100vw" if (rmCornerText) { - document.getElementById("loadingCornerText").remove() + let cText = document.getElementById("loadingCornerText") + if (cText) { cText.remove() } } newTip() }, fadeOutDur * 1000) @@ -90,7 +96,7 @@ function removeLoadingScreen(rmCornerText = false) { function stopShowingLoading() { - localStorage["showLoading"] = false + localStorage["fakeLoading"] = false }