This commit is contained in:
NigeParis 2026-01-14 16:09:40 +01:00 committed by Maix0
parent 308818fd74
commit c623019fe3

View file

@ -85,9 +85,9 @@ const systemWindow = document.getElementById("chat-system-box") as HTMLDivElemen
let anti_flicker_control = false;
function chatKeyToggle() {
let anti_flicker_control = false;
const chat_toggle_key = 'f1';
document.addEventListener("keydown", (event) => {
if (event.repeat && keysPressed[chat_toggle_key] === true) {
@ -145,9 +145,9 @@ function initChatSocket() {
!sendButton ||
!sendtextbox ||
!systemWindow
) return showError("fatal error");
// Listen for the 'connect' event
socket.on("connect", async () => {
await waitSocketConnected(socket);
@ -550,10 +550,7 @@ document.addEventListener("ft:userChange", (user) => {
window.__state.chatSock = undefined;
if (newUser === null) {
quitChat();
// logged out
// hide chat button
} else {
// user has changed
initChatSocket();
}
});