diff --git a/tdx-enhanced.js b/tdx-enhanced.js index 75176d6..018bc34 100644 --- a/tdx-enhanced.js +++ b/tdx-enhanced.js @@ -844,7 +844,19 @@ let statusTime = statusLink.querySelector("#statusTime") let statusText = statusLink.querySelector("#statusText") - if (statusData && statusData.msg != "All Systems Operational") { + let operationalText = "All Systems Operational" + + if (statusData) { + if (statusData.msg.length==0) { + statusData.msg = operationalText + } + } else { + statusData = { + msg: operationalText + } + } + + if (!statusData.msg == operationalText) { statusIcon.classList = ("fa-solid fa-triangle-exclamation") } else { statusIcon.classList = ("fa-solid fa-check")