From 85d2afbdd0ae5be00af852ebf120ca01a8179313 Mon Sep 17 00:00:00 2001 From: Rahix Date: Sat, 28 Sep 2024 00:05:18 +0200 Subject: [PATCH] succd: Fix javascript and template syntax errors Turns out the go templating engine fails silently when unclosed strings are present in the templated file......... Fix javascript code :)) --- succbone/succd/index.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/succbone/succd/index.html b/succbone/succd/index.html index 7ed97c4..4d758be 100644 --- a/succbone/succd/index.html +++ b/succbone/succd/index.html @@ -290,15 +290,13 @@ window.addEventListener("load", (_) => { const data = JSON.parse(event.data); volts.innerHTML = data.Volts; mbar.innerHTML = data.Mbar; - failsafe.innerHTML = data.failsafe ? "ON" : "OFF"; - if data.failsafe { - failsafe.innerHTML = "ON""; + failsafe.innerHTML = data.Failsafe ? "ON" : "OFF"; + if (data.Failsafe) { failsafe.style = "background-color: #f06060"; } else { - failsafe.innerHTML = "OFF"; failsafe.style = "background-color: #60f060"; } - if data.highpressure { + if (data.HighPressure) { highpressure.innerHTML = "ON"; highpressure.style = "background-color: #f06060"; } else {