mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
move inline javascript to its own file
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
8a21f2a8f5
commit
4c304d8775
2 changed files with 15 additions and 16 deletions
13
php/public/automatic_reload.js
Normal file
13
php/public/automatic_reload.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
if (document.hasFocus()) {
|
||||
// hide reload button if the site reloads automatically
|
||||
var list = document.getElementsByClassName("reload button");
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
// list[i] is a node with the desired class name
|
||||
list[i].style.display = 'none';
|
||||
}
|
||||
|
||||
// set timeout for reload
|
||||
setTimeout(function(){
|
||||
window.location.reload(1);
|
||||
}, 5000);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue