add before-unload animation

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2022-03-30 17:06:01 +02:00
parent 59a49c62b4
commit 8c7e0bc63a
3 changed files with 9 additions and 0 deletions

View file

@ -10,4 +10,8 @@ if (document.hasFocus()) {
setTimeout(function(){
window.location.reload(1);
}, 5000);
} else {
window.addEventListener("beforeunload", function() {
document.getElementById('overlay').classList.add('loading')
});
}

View file

@ -0,0 +1,3 @@
window.addEventListener("beforeunload", function() {
document.getElementById('overlay').classList.add('loading')
});

View file

@ -406,6 +406,8 @@
{% if isApacheStarting == true or isBackupContainerRunning == true or isWatchtowerRunning == true %}
<script type="text/javascript" src="automatic_reload.js"></script>
{% else %}
<script type="text/javascript" src="before-unload.js"></script>
{% endif %}
</div>