convert all indents to tabs
This commit is contained in:
+32
-32
@@ -2,48 +2,48 @@ let loadingScreen = document.getElementById("loadingScreen")
|
||||
let mainDiv = document.getElementById("mainDiv")
|
||||
|
||||
function slideTransition(url, event) {
|
||||
const ctrlPressed = event.ctrlKey
|
||||
let dur = 500
|
||||
let loadingTime = randomFloat(500, 1500)
|
||||
const ctrlPressed = event.ctrlKey
|
||||
let dur = 500
|
||||
let loadingTime = randomFloat(500, 1500)
|
||||
|
||||
if (localStorage["fakeLoading"] != "true") { dur = 500; loadingTime = 0; }
|
||||
if (localStorage["fakeLoading"] != "true") { dur = 500; loadingTime = 0; }
|
||||
|
||||
debugPrint("loadDur transition", loadingTime)
|
||||
debugPrint("loadDur transition", loadingTime)
|
||||
|
||||
const slideLeft = `slide-left ${dur / 1000}s cubic-bezier(0, 0, 0, 1.46) forwards`
|
||||
const slideLeft = `slide-left ${dur / 1000}s cubic-bezier(0, 0, 0, 1.46) forwards`
|
||||
|
||||
loadingScreen.style.animation = slideLeft
|
||||
loadingScreen.style.pointerEvents = "auto"
|
||||
mainDiv.style.animation = slideLeft
|
||||
loadingScreen.style.animation = slideLeft
|
||||
loadingScreen.style.pointerEvents = "auto"
|
||||
mainDiv.style.animation = slideLeft
|
||||
|
||||
setLoadingProgress(`Loading URL "${url}"`)
|
||||
setLoadingProgress(`Loading URL "${url}"`)
|
||||
|
||||
setTimeout(function() {
|
||||
setLoadingProgress("Done!")
|
||||
setTimeout(function() {
|
||||
if (ctrlPressed) {
|
||||
window.open(url, "_blank")
|
||||
}
|
||||
else if (url.startsWith("http")) {
|
||||
window.open(url, "_blank").focus()
|
||||
}
|
||||
else {
|
||||
document.location = url
|
||||
}
|
||||
setTimeout(function() {
|
||||
setLoadingProgress("Done!")
|
||||
setTimeout(function() {
|
||||
if (ctrlPressed) {
|
||||
window.open(url, "_blank")
|
||||
}
|
||||
else if (url.startsWith("http")) {
|
||||
window.open(url, "_blank").focus()
|
||||
}
|
||||
else {
|
||||
document.location = url
|
||||
}
|
||||
|
||||
resetLoadingScreen()
|
||||
}, loadingTime)
|
||||
}, dur + loadingTime)
|
||||
resetLoadingScreen()
|
||||
}, loadingTime)
|
||||
}, dur + loadingTime)
|
||||
}
|
||||
|
||||
function resetLoadingScreen() {
|
||||
const fadeOutDur = 0.5
|
||||
const fadeOutDur = 0.5
|
||||
|
||||
loadingScreen.style.left = "0vw"
|
||||
loadingScreen.style.animation = `fade-out ${fadeOutDur}s forwards`
|
||||
mainDiv.style.animation = "none"
|
||||
loadingScreen.style.left = "0vw"
|
||||
loadingScreen.style.animation = `fade-out ${fadeOutDur}s forwards`
|
||||
mainDiv.style.animation = "none"
|
||||
|
||||
setTimeout(function() {
|
||||
loadingScreen.style.left = "100vw"
|
||||
}, fadeOutDur * 1000)
|
||||
setTimeout(function() {
|
||||
loadingScreen.style.left = "100vw"
|
||||
}, fadeOutDur * 1000)
|
||||
}
|
||||
Reference in New Issue
Block a user