From b0a7c0dd7fc9acde49349368446a881941313824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kr=C3=BChlmann?= Date: Thu, 8 Jan 2026 15:42:41 +0100 Subject: [PATCH] Re-add channels page --- src/main/resources/static/js/channels.js | 10 ++++++++++ src/main/resources/static/js/downloads.js | 3 ++- src/main/resources/templates/channels.html | 3 ++- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/static/js/channels.js diff --git a/src/main/resources/static/js/channels.js b/src/main/resources/static/js/channels.js new file mode 100644 index 0000000..40547dd --- /dev/null +++ b/src/main/resources/static/js/channels.js @@ -0,0 +1,10 @@ +const channelNameInput = document.getElementById("channel-search"); + +function onOpenOverlayButtonClick(event) { + event.preventDefault(); + const channelName = channelNameInput.value.trim().toLowerCase(); + if (channelName) { + const overlayUrl = `/view/${channelName}/broadcast`; + window.location.href = overlayUrl; + } +} diff --git a/src/main/resources/static/js/downloads.js b/src/main/resources/static/js/downloads.js index 4a0b9ed..ff088d1 100644 --- a/src/main/resources/static/js/downloads.js +++ b/src/main/resources/static/js/downloads.js @@ -1,5 +1,5 @@ function detectPlatform() { - const navigatorPlatform = (navigator.userAgentData?.platform || navigator.platform || "").toLowerCase(); + const navigatorPlatform = (navigator.userAgentData?.platform || "").toLowerCase(); const userAgent = (navigator.userAgent || "").toLowerCase(); const platformString = `${navigatorPlatform} ${userAgent}`; @@ -12,6 +12,7 @@ function detectPlatform() { if (platformString.includes("linux")) { return "linux"; } + console.warn(`Unable to detect platform from string: ${platformString}`); return null; } diff --git a/src/main/resources/templates/channels.html b/src/main/resources/templates/channels.html index 2275b6f..dd5796b 100644 --- a/src/main/resources/templates/channels.html +++ b/src/main/resources/templates/channels.html @@ -35,7 +35,7 @@ autocomplete="off" /> - + @@ -67,5 +67,6 @@ +