Fix preloader overlay not being removed
This commit is contained in:
parent
b7e6a9c585
commit
5514197ce4
@ -95,6 +95,11 @@ window.addEventListener("DOMContentLoaded", function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
window.addEventListener("load", function () {
|
window.addEventListener("load", async function () {
|
||||||
document.getElementById("preloader").classList.add("fadeout");
|
document.getElementById("preloader").classList.add("fadeout");
|
||||||
|
// I don't actually know how promises or async works
|
||||||
|
// ¯\_(ツ)_/¯
|
||||||
|
// https://stackoverflow.com/questions/951021/what-is-the-javascript-version-of-sleep
|
||||||
|
await new Promise(r => setTimeout(r, 250))
|
||||||
|
document.getElementById("preloader").style.display = "none";
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user