You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nextcloud-server/core/js/maintenance-check.js

17 lines
487 B

// Check every 20 seconds via status.php if maintenance is over
window.setInterval(checkStatus, 20000);
function checkStatus() {
var request = new XMLHttpRequest();
request.open("GET", OC.webroot+'/status.php', true);
request.onreadystatechange = function() {
if (request.readyState === 4) {
var response = request.responseText;
var responseobj = JSON.parse(response);
if (responseobj.maintenance === false) {
window.location.reload();
}
}
};
request.send();
}