fix loader close

This commit is contained in:
Jonas Leder 2021-04-18 22:36:31 +02:00
parent 78ebe5012d
commit 3ebef6cc8a
2 changed files with 7 additions and 3 deletions

View file

@ -6,6 +6,4 @@ document.onreadystatechange = function () {
element.target = "_blank";
}
});
document.querySelector(".loader").style.display = "none";
}

View file

@ -8,4 +8,10 @@ div.innerHTML = `<div class="loader-dots">
<div class="dots"></div>
</div>`;
document.body.appendChild(div);
document.body.appendChild(div);
document.addEventListener('readystatechange', event => {
if (event.target.readyState === "complete") {
document.querySelector(".loader").style.display = "none";
}
});