From 9a57981718da996897b9f7019decb067441a85f3 Mon Sep 17 00:00:00 2001 From: taaziz1 Date: Sun, 28 Dec 2025 22:02:33 -0800 Subject: [PATCH 1/3] add debug button --- static/index.css | 11 +++++++++++ static/index.html | 11 ++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/static/index.css b/static/index.css index 5316bc2..67fa213 100644 --- a/static/index.css +++ b/static/index.css @@ -71,6 +71,17 @@ input { margin-left: 10px; } +#debug-btn{ + height: 2.2em; + background-color: orange; + color: white; + border: none; + border-radius: 4px; + padding: 8px 16px; + cursor: pointer; + margin-left: 10px; +} + .card { background: hsla(0, 0%, 31%, 0.7); border-radius: 12px; diff --git a/static/index.html b/static/index.html index d6c83d3..27b40dc 100644 --- a/static/index.html +++ b/static/index.html @@ -16,9 +16,12 @@
-
+

SCE TV

+
+
+
@@ -214,6 +217,12 @@

// Scroll to bottom logsContent.scrollTop = logsContent.scrollHeight; } + + // Adds a function to open the debug page in a new window when the debug button is clicked + document.getElementById("debug-btn").addEventListener("click", function () { + let debugURL = new URL(window.location.href + "debug") + window.open(debugURL); + }); From 7b314b518d64d241f0a688a3decf4660ceccdb72 Mon Sep 17 00:00:00 2001 From: taaziz1 Date: Mon, 29 Dec 2025 17:54:37 -0800 Subject: [PATCH 2/3] change debugURL to const --- static/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/index.html b/static/index.html index 27b40dc..f8058cb 100644 --- a/static/index.html +++ b/static/index.html @@ -220,7 +220,7 @@

// Adds a function to open the debug page in a new window when the debug button is clicked document.getElementById("debug-btn").addEventListener("click", function () { - let debugURL = new URL(window.location.href + "debug") + const debugURL = new URL(window.location.href + (window.location.href.endsWith('/') ? "" : "/") + "debug") window.open(debugURL); }); From b293e16e621c4e876c107f562c009375ac1c66c8 Mon Sep 17 00:00:00 2001 From: taaziz1 Date: Thu, 1 Jan 2026 01:30:16 -0800 Subject: [PATCH 3/3] move URL constructor to its own line --- static/index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/static/index.html b/static/index.html index f8058cb..879aa39 100644 --- a/static/index.html +++ b/static/index.html @@ -220,7 +220,10 @@

// Adds a function to open the debug page in a new window when the debug button is clicked document.getElementById("debug-btn").addEventListener("click", function () { - const debugURL = new URL(window.location.href + (window.location.href.endsWith('/') ? "" : "/") + "debug") + const debugURL = new URL(window.location.origin + window.location.pathname); + debugURL.pathname = debugURL.pathname.endsWith('/') + ? `${debugURL.pathname}debug` + : `${debugURL.pathname}/debug`; window.open(debugURL); });