added transition when pressing buttons

This commit is contained in:
8BitBiscotti
2024-12-13 09:49:38 +01:00
parent 515cc107ab
commit 41268fba3c
6 changed files with 78 additions and 44 deletions
+8 -1
View File
@@ -22,6 +22,11 @@ let selectedTip = tips[randomIntFrom0(tips.length)]
const showLoading = localStorage["showLoading"] || "true"
function newTip() {
selectedTip = tips[randomIntFrom0(tips.length)]
}
function setLoadingProgress(newText) {
loadingScreenProgress.innerHTML = `Loading...<br>${newText}<br><br>Tip: ${selectedTip}`
}
@@ -48,7 +53,9 @@ function removeLoadingScreen() {
loadingScreenEl.style.animation = `fade-out ${fadeOutDur}s forwards`
setTimeout(function() {
document.body.removeChild(loadingScreenEl)
loadingScreenEl.style.left = "100vw"
document.getElementById("loadingCornerText").remove()
newTip()
}, fadeOutDur * 1000)
}, 500)
}