clean: respect es11
This commit is contained in:
@ -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() {
|
||||
|
Reference in New Issue
Block a user