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..879aa39 100644 --- a/static/index.html +++ b/static/index.html @@ -16,9 +16,12 @@
-
+

SCE TV

+
+
+
@@ -214,6 +217,15 @@

// 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 () { + const debugURL = new URL(window.location.origin + window.location.pathname); + debugURL.pathname = debugURL.pathname.endsWith('/') + ? `${debugURL.pathname}debug` + : `${debugURL.pathname}/debug`; + window.open(debugURL); + });