From c0291be1298c38dfabc73febb4a6f5b053809aa5 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Sun, 14 Dec 2025 21:04:53 +0100 Subject: [PATCH] timeout --- modules/web.html | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/modules/web.html b/modules/web.html index 1734c3c..8a19327 100644 --- a/modules/web.html +++ b/modules/web.html @@ -308,9 +308,7 @@ putQueue.forEach((element, i) => { const li = document.createElement("li"); li.textContent = element; - if(i === 0 && skipNext) { - li.style.textDecoration = "line-through"; - } + if(i === 0 && skipNext) li.style.textDecoration = "line-through"; ul.appendChild(li); }); } @@ -399,9 +397,7 @@ ws.send(JSON.stringify({action:"add_to_toplay", songs: [path]})) Array.from(document.getElementById("playlist-box").children).forEach(c => c.classList.remove("selected")); }); - document.getElementById("clear-btn").addEventListener("click", () => { - ws.send(JSON.stringify({action:"clear_toplay"})) - }); + document.getElementById("clear-btn").addEventListener("click", () => {ws.send(JSON.stringify({action:"clear_toplay"}))}); document.getElementById("add-to-put-btn").addEventListener("click", () => { let fullPath = null; @@ -431,7 +427,7 @@ else alert("Please select a file to add."); }); - connectWs(); + setTimeout(connectWs, 100) \ No newline at end of file