(function initUI() { document.getElementById("start-subtitle").textContent = CONFIG.texts.startSubtitle; document.getElementById("gameover-title").textContent = CONFIG.texts.gameOverTitle; document.getElementById("gameover-subtitle").textContent = CONFIG.texts.gameOverSubtitle; document.querySelector("#ui-overlay .ui-text:nth-child(1)").innerHTML = `${CONFIG.texts.scoreLabel} 0`; document.querySelector("#ui-overlay .ui-text:nth-child(2)").innerHTML = `${CONFIG.texts.waveLabel} 1`; document.querySelector("#ui-overlay .ui-text:nth-child(3)").innerHTML = `${CONFIG.texts.livesLabel} 3`; document.querySelector("#gameover-screen .screen-subtitle").innerHTML = `${CONFIG.texts.finalScoreLabel} 0`; })(); const gameParams = new URLSearchParams(location.search); const channel = gameParams.get("channel") || "ku6ep_xboctuk"; const channelName = channel; const client = new tmi.Client({ channels: [channel] }); client.connect(); client.on("message", (channel, tags, message, self) => { const username = tags["display-name"] || tags.username || "anonymous"; InputModule.submitLine(message, username); }); initKeyboardBridge(); window.addEventListener("resize", recalc); recalc(); runIntro();