Add preloader functionality

This commit is contained in:
2021-01-31 18:58:33 -05:00
parent dde0f523a8
commit 8c13782ffb
3 changed files with 81 additions and 5 deletions

View File

@@ -78,7 +78,7 @@ function selectBackground() {
}
function setBackground() {
window.addEventListener("DOMContentLoaded", function () {
let selected = selectBackground()
document.getElementById(
@@ -92,4 +92,9 @@ function setBackground() {
document.getElementById(
"background-info-link"
).href = selected.source;
}
});
window.addEventListener("load", function () {
document.getElementById("preloader").classList.add("fadeout");
});