From e4d77dc0b219014cbf3e382aeda438c09a116cbc Mon Sep 17 00:00:00 2001 From: pap-24 <71824952+pap-24@users.noreply.github.com> Date: Sat, 1 Jun 2024 21:06:37 +0300 Subject: [PATCH] Fixed the "Unexpected space before function parentheses" errors --- client/src/scripts/ui.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/client/src/scripts/ui.ts b/client/src/scripts/ui.ts index ce720f46e..2218630cd 100644 --- a/client/src/scripts/ui.ts +++ b/client/src/scripts/ui.ts @@ -207,7 +207,7 @@ export async function setUpUI(game: Game): Promise { updateServerSelectors(); // eslint-disable-next-line @typescript-eslint/no-misused-promises - serverList.children("li.server-list-item").on("click", async function (this: HTMLLIElement) { + serverList.children("li.server-list-item").on("click", async function(this: HTMLLIElement) { const region = this.getAttribute("data-region"); if (region === null) return; @@ -312,7 +312,7 @@ export async function setUpUI(game: Game): Promise { }); const createTeamMenu = $("#create-team-menu"); - $("#btn-create-team, #btn-join-team").on("click", function () { + $("#btn-create-team, #btn-join-team").on("click", function() { const now = Date.now(); if (now - lastPlayButtonClickTime < 1500 || teamSocket) return; lastPlayButtonClickTime = now; @@ -521,7 +521,7 @@ export async function setUpUI(game: Game): Promise { .css("color", "#FFFFFF00"); }); - $("#create-team-toggle-auto-fill").on("click", function () { + $("#create-team-toggle-auto-fill").on("click", function() { autoFill = $(this).prop("checked"); teamSocket?.send(JSON.stringify({ type: CustomTeamMessages.Settings, @@ -529,7 +529,7 @@ export async function setUpUI(game: Game): Promise { })); }); - $("#create-team-toggle-lock").on("click", function () { + $("#create-team-toggle-lock").on("click", function() { teamSocket?.send(JSON.stringify({ type: CustomTeamMessages.Settings, locked: $(this).prop("checked") @@ -685,7 +685,7 @@ export async function setUpUI(game: Game): Promise { void game.endGame(); }); // eslint-disable-next-line @typescript-eslint/no-misused-promises - $("#btn-play-again, #btn-spectate-replay").on("click", async () => { + $("#btn-play-again, #btn-spectate-replay").on("click", async() => { await game.endGame(); if (teamSocket) teamSocket.send(JSON.stringify({ type: CustomTeamMessages.Start })); // TODO Check if player is team leader else joinGame(); @@ -796,7 +796,7 @@ Video evidence is required.`)) { ${skin.name} `); - skinItem.on("click", function () { + skinItem.on("click", function() { game.console.setBuiltInCVar("cv_loadout_skin", skin.idString); $(this).addClass("selected").siblings().removeClass("selected"); updateSplashCustomize(skin.idString); @@ -822,7 +822,7 @@ Video evidence is required.`)) { ${emote.name} `); - emoteItem.on("click", function () { + emoteItem.on("click", function() { if (selectedEmoteSlot === undefined) return; game.console.setBuiltInCVar(`cv_loadout_${selectedEmoteSlot}_emote`, emote.idString); @@ -924,7 +924,7 @@ Video evidence is required.`)) { "background-repeat": "no-repeat" }); - crosshairItem.on("click", function () { + crosshairItem.on("click", function() { game.console.setBuiltInCVar("cv_loadout_crosshair", crosshairIndex); loadCrosshair(); $(this).addClass("selected").siblings().removeClass("selected"); @@ -975,7 +975,7 @@ Video evidence is required.`)) { ` ); - noBadgeItem.on("click", function () { + noBadgeItem.on("click", function() { game.console.setBuiltInCVar("cv_loadout_badge", ""); $(this).addClass("selected").siblings().removeClass("selected"); }); @@ -992,7 +992,7 @@ Video evidence is required.`)) { ` ); - badgeItem.on("click", function () { + badgeItem.on("click", function() { game.console.setBuiltInCVar("cv_loadout_badge", badge.idString); $(this).addClass("selected").siblings().removeClass("selected"); }); @@ -1203,7 +1203,7 @@ Video evidence is required.`)) { }); renderSelect.value = game.console.getBuiltInCVar("cv_renderer"); - void (async () => { + void (async() => { $("#webgpu-option").toggle(await isWebGPUSupported()); })(); @@ -1570,7 +1570,7 @@ Video evidence is required.`)) { $("#btn-toggle-ping") .show() - .on("click", function () { + .on("click", function() { game.inputManager.pingWheelActive = !game.inputManager.pingWheelActive; const { pingWheelActive } = game.inputManager; $(this) @@ -1630,7 +1630,7 @@ Video evidence is required.`)) { tabContent.show(); }); - $("#warning-modal-agree-checkbox").on("click", function () { + $("#warning-modal-agree-checkbox").on("click", function() { $("#warning-btn-play-solo, #btn-play-solo").toggleClass("btn-disabled", !$(this).prop("checked")); });