Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the "Unexpected space before function parentheses" errors #325

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions client/src/scripts/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export async function setUpUI(game: Game): Promise<void> {
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;
Expand Down Expand Up @@ -312,7 +312,7 @@ export async function setUpUI(game: Game): Promise<void> {
});

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;
Expand Down Expand Up @@ -521,15 +521,15 @@ export async function setUpUI(game: Game): Promise<void> {
.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,
autoFill
}));
});

$("#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")
Expand Down Expand Up @@ -685,7 +685,7 @@ export async function setUpUI(game: Game): Promise<void> {
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();
Expand Down Expand Up @@ -796,7 +796,7 @@ Video evidence is required.`)) {
</div>
<span class="skin-name">${skin.name}</span>
</div>`);
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);
Expand All @@ -822,7 +822,7 @@ Video evidence is required.`)) {
<span class="emote-name">${emote.name}</span>
</div>`);

emoteItem.on("click", function () {
emoteItem.on("click", function() {
if (selectedEmoteSlot === undefined) return;
game.console.setBuiltInCVar(`cv_loadout_${selectedEmoteSlot}_emote`, emote.idString);

Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -975,7 +975,7 @@ Video evidence is required.`)) {
</div>`
);

noBadgeItem.on("click", function () {
noBadgeItem.on("click", function() {
game.console.setBuiltInCVar("cv_loadout_badge", "");
$(this).addClass("selected").siblings().removeClass("selected");
});
Expand All @@ -992,7 +992,7 @@ Video evidence is required.`)) {
</div>`
);

badgeItem.on("click", function () {
badgeItem.on("click", function() {
game.console.setBuiltInCVar("cv_loadout_badge", badge.idString);
$(this).addClass("selected").siblings().removeClass("selected");
});
Expand Down Expand Up @@ -1203,7 +1203,7 @@ Video evidence is required.`)) {
});
renderSelect.value = game.console.getBuiltInCVar("cv_renderer");

void (async () => {
void (async() => {
$("#webgpu-option").toggle(await isWebGPUSupported());
})();

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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"));
});

Expand Down
Loading