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 @@ +