/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.js :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: edbernar { newGameButton.removeAttribute("id"); newPrivateButton.setAttribute("id", "selected"); await showListUser(); }); newGameButton.addEventListener("click", () => { newPrivateButton.removeAttribute("id"); newGameButton.setAttribute("id", "selected"); showActualGameMessage(); }); } function removeButtonIfExist() { const divButtonTypeChatHome = document.getElementById("buttonTypeChatHome"); if (divButtonTypeChatHome) { divButtonTypeChatHome.remove(); document.getElementById("messageListChatHome").remove(); } } async function showChatMenu() { const infoChat = document.getElementById("infoChat"); chatDiv.style.display = "flex"; if (userMeInfo.id !== -1) { if (infoChat) infoChat.remove(); removeButtonIfExist(); addDefaultButton(); await showListUser(); } } function hideChatMenu() { console.log("hideChatMenu"); chatDiv.style.display = "none"; infoPanel.isOpen = false; } export { LiveChat };