forked from Firepup650/firepup-site
TODO: Use env var for maintenance checks
This commit is contained in:
parent
dee1fbc79e
commit
7a0ad54639
1 changed files with 5 additions and 5 deletions
|
@ -1,12 +1,12 @@
|
||||||
maintenance = false
|
maintenance = false //TODO: Use env var instead
|
||||||
if (maintenance) {
|
if (maintenance) {
|
||||||
if (window.location.href.indexOf("maintenance") == -1) {
|
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").innerHTML = `<span class="warning">Warning:<br/>Site under maintenance.<br/>Be warned, site may be unstable.</span>`
|
||||||
}
|
}
|
||||||
document.getElementById("Maintenance").removeAttribute("hidden")
|
document.getElementById("Maintenance").removeAttribute("hidden")
|
||||||
if (window.location.href.indexOf("maintenance") == -1 && window.location.href.indexOf('id') == -1) {
|
//if (window.location.href.indexOf("maintenance") == -1 && window.location.href.indexOf('id') == -1) {
|
||||||
window.location.href = "/maintenance"
|
//window.location.href = "/maintenance"
|
||||||
}
|
//}
|
||||||
} else if (!(window.location.href.indexOf("maintenance") == -1)) {
|
} else if (!(window.location.href.indexOf("maintenance") == -1)) {
|
||||||
document.getElementById("Maintenance").innerHTML = `<span class="rainbow">Website not under maintenance.</span>`
|
document.getElementById("Maintenance").innerHTML = `<span class="rainbow">Website not under maintenance.</span>`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue