removed top-left text if fake loading screen is disabled
This commit is contained in:
@@ -160,7 +160,7 @@ document.addEventListener("DOMContentLoaded", async function() {
|
|||||||
pauseAnimBtn(localStorage["isAnimating"] || "true")
|
pauseAnimBtn(localStorage["isAnimating"] || "true")
|
||||||
debugPrint("isAnimating", isAnimating)
|
debugPrint("isAnimating", isAnimating)
|
||||||
|
|
||||||
if (showLoading != "true") {
|
if (fakeLoading != "true") {
|
||||||
removeLoadingScreen(true)
|
removeLoadingScreen(true)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ async function loadTips() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const showLoading = localStorage["showLoading"] || "true"
|
const fakeLoading = localStorage["fakeLoading"] || "true"
|
||||||
let selectedTip = "undefined"
|
let selectedTip = "undefined"
|
||||||
|
|
||||||
|
|
||||||
@@ -57,6 +57,11 @@ function setLoadingProgress(newText) {
|
|||||||
function startLoadingScreen() {
|
function startLoadingScreen() {
|
||||||
loadingScreenProgress.innerHTML = `Loading...<br><br>Tip: ${selectedTip}`
|
loadingScreenProgress.innerHTML = `Loading...<br><br>Tip: ${selectedTip}`
|
||||||
|
|
||||||
|
if (fakeLoading != "true") {
|
||||||
|
let cText = document.getElementById("loadingCornerText")
|
||||||
|
if (cText) { cText.remove() }
|
||||||
|
}
|
||||||
|
|
||||||
const loadDur = randomFloat(2000, 4000)
|
const loadDur = randomFloat(2000, 4000)
|
||||||
debugPrint("loadDur initial", loadDur)
|
debugPrint("loadDur initial", loadDur)
|
||||||
|
|
||||||
@@ -81,7 +86,8 @@ function removeLoadingScreen(rmCornerText = false) {
|
|||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
loadingScreenEl.style.left = "100vw"
|
loadingScreenEl.style.left = "100vw"
|
||||||
if (rmCornerText) {
|
if (rmCornerText) {
|
||||||
document.getElementById("loadingCornerText").remove()
|
let cText = document.getElementById("loadingCornerText")
|
||||||
|
if (cText) { cText.remove() }
|
||||||
}
|
}
|
||||||
newTip()
|
newTip()
|
||||||
}, fadeOutDur * 1000)
|
}, fadeOutDur * 1000)
|
||||||
@@ -90,7 +96,7 @@ function removeLoadingScreen(rmCornerText = false) {
|
|||||||
|
|
||||||
|
|
||||||
function stopShowingLoading() {
|
function stopShowingLoading() {
|
||||||
localStorage["showLoading"] = false
|
localStorage["fakeLoading"] = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user