(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 params = new URLSearchParams(location.search);
const channel = params.get("channel") || "ku6ep_xboctuk";
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);
});
window.addEventListener("resize", recalc);
recalc();
runIntro();