socket.on("popup", () => { popup.style.display = "block"; setTimeout(() => { popup.style.display = "none"; }, 10_000) }); closeButton.addEventListener("click", () => { popup.style.display = "none"; }); window.addEventListener("click", (event) => { if (event.target === popup) { popup.style.display = "none"; } });