maintenance = false //TODO: Use env var instead if (maintenance) { if (window.location.href.indexOf("maintenance") == -1) { document.getElementById("Maintenance").innerHTML = `Warning:
Site under maintenance.
Be warned, site may be unstable.
` } document.getElementById("Maintenance").removeAttribute("hidden") //if (window.location.href.indexOf("maintenance") == -1 && window.location.href.indexOf('id') == -1) { //window.location.href = "/maintenance" //} } else if (!(window.location.href.indexOf("maintenance") == -1)) { document.getElementById("Maintenance").innerHTML = `Website not under maintenance.` } console.info("Maintenance Script done.")