clean: respect es11

This commit is contained in:
2024-02-20 09:22:11 +01:00
parent 54ef19a340
commit c143d96443
36 changed files with 163 additions and 163 deletions

View File

@ -13,23 +13,23 @@ export default class extends AbstractAuthenticatedView {
if (client.matchmaking.searching)
{
client.matchmaking.stop();
document.getElementById("button").value = "Find a game"
document.getElementById("button").value = "Find a game";
}
else
{
let nb_players = document.getElementById("nb_players-input").value
let nb_players = document.getElementById("nb_players-input").value;
await client.matchmaking.start(this.onreceive.bind(this), this.ondisconnect.bind(this), nb_players);
document.getElementById("button").value = "Stop matchmaking"
document.getElementById("button").value = "Stop matchmaking";
}
}
ondisconnect(event)
{
if (event.code === 1000)
clear("innerText", ["detail"])
document.getElementById("button").value = "Find a game"
clear("innerText", ["detail"]);
document.getElementById("button").value = "Find a game";
}
onreceive(data)
@ -39,7 +39,7 @@ export default class extends AbstractAuthenticatedView {
navigateTo(`/games/${data.game_id}`);
return;
}
this.display_data(data)
this.display_data(data);
}
display_data(data)
@ -50,7 +50,7 @@ export default class extends AbstractAuthenticatedView {
async postInit()
{
document.getElementById("button").onclick = this.press_button.bind(this)
document.getElementById("button").onclick = this.press_button.bind(this);
}
async getHtml() {