From dda78410139b4af549de22c7af8dba7f1d845ec0 Mon Sep 17 00:00:00 2001 From: sstidl Date: Sun, 29 Dec 2024 19:29:03 +0000 Subject: [PATCH] hide serverselector on only one server --- frontend/javascript/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/javascript/index.js b/frontend/javascript/index.js index 53135eb29..05415f7c8 100644 --- a/frontend/javascript/index.js +++ b/frontend/javascript/index.js @@ -173,7 +173,6 @@ async function applyServerListJSON() { function populateDropdown(servers) { const serverSelector = document.querySelector("div.server-selector"); const serverList = serverSelector.querySelector("ul.servers"); - serverSelector.classList.add("active"); // If we have only a single server, just show it if (servers.length === 1) { @@ -181,6 +180,7 @@ function populateDropdown(servers) { selectServer(servers[0]); return; } + serverSelector.classList.add("active"); // Make the dropdown open and close serverSelector.addEventListener("click", () => {