Merge pull request #347 from nextcloud/enh/noid/move-inline-js-to-file

move inline javascript to its own file
This commit is contained in:
Simon L 2022-03-16 13:08:51 +01:00 committed by GitHub
commit 79fdbee6b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 16 deletions

View 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);
}

View file

@ -249,7 +249,7 @@
{% endif %}
{% endif %}
{% if isBackupOrRestoreRunning == false %}
{% if isBackupContainerRunning == false %}
<h2 id="mastercontainer">Mastercontainer</h2>
You are currently running the {{ current_channel }} channel. (<a href="/api/docker/logs?id=nextcloud-aio-mastercontainer">Logs</a>)<br><br>
@ -294,21 +294,7 @@
{% endif %}
{% if isApacheStarting == true or isBackupContainerRunning == true or isWatchtowerRunning == true %}
<script>
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);
}
</script>
<script type="text/javascript" src="automatic_reload.js"></script>
{% endif %}
</div>