mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-23 07:56:57 +00:00
try to fix glitchy buttons
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
26c042fd28
commit
5a826222d4
1 changed files with 18 additions and 16 deletions
|
|
@ -1,17 +1,19 @@
|
||||||
if (document.hasFocus()) {
|
document.addEventListener("DOMContentLoaded", function(event) {
|
||||||
// hide reload button if the site reloads automatically
|
if (document.hasFocus()) {
|
||||||
let list = document.getElementsByClassName("reload button");
|
// hide reload button if the site reloads automatically
|
||||||
for (let i = 0; i < list.length; i++) {
|
let list = document.getElementsByClassName("reload button");
|
||||||
// list[i] is a node with the desired class name
|
for (let i = 0; i < list.length; i++) {
|
||||||
list[i].style.display = 'none';
|
// list[i] is a node with the desired class name
|
||||||
}
|
list[i].style.display = 'none';
|
||||||
|
}
|
||||||
|
|
||||||
// set timeout for reload
|
// set timeout for reload
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
window.location.reload(1);
|
window.location.reload(1);
|
||||||
}, 5000);
|
}, 5000);
|
||||||
} else {
|
} else {
|
||||||
window.addEventListener("beforeunload", function() {
|
window.addEventListener("beforeunload", function() {
|
||||||
document.getElementById('overlay').classList.add('loading')
|
document.getElementById('overlay').classList.add('loading')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue