TODO: Use env var for maintenance checks

This commit is contained in:
Firepup Sixfifty 2023-10-01 22:41:02 -05:00
parent dee1fbc79e
commit 7a0ad54639

View file

@ -1,12 +1,12 @@
maintenance = false
maintenance = false //TODO: Use env var instead
if (maintenance) {
if (window.location.href.indexOf("maintenance") == -1) {
document.getElementById("Maintenance").innerHTML = `<span class="warning">Warning:<br/>Site under maintenance.<br/>Be warned, site may be unstable.</span>`
}
document.getElementById("Maintenance").removeAttribute("hidden")
if (window.location.href.indexOf("maintenance") == -1 && window.location.href.indexOf('id') == -1) {
window.location.href = "/maintenance"
}
//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 = `<span class="rainbow">Website not under maintenance.</span>`
}