From fef09593445dcf3a56ee9074b88bde7b0a9f33f9 Mon Sep 17 00:00:00 2001 From: Karan Jayachandra Date: Sat, 15 Nov 2025 21:59:09 +0100 Subject: Added the changes to fix the bug with class name and changed the SVG color to match the buttons --- src/manage.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/manage.js') diff --git a/src/manage.js b/src/manage.js index 6ed58bd..83a9b4c 100644 --- a/src/manage.js +++ b/src/manage.js @@ -95,8 +95,12 @@ function normalize(data) { export class GuestManager extends Manager { constructor(description, count) { - if ( typeof description === "undefined" ) { description = "Guest"; }; - if ( typeof count === "undefined" ) { count = 18; }; + if (typeof description === "undefined") { + description = "Guest"; + } + if (typeof count === "undefined") { + count = 18; + } super(description, count); } createItem(i) { @@ -112,7 +116,7 @@ export class GuestManager extends Manager { return normalize(super.active()); } incrementGames(list) { - for (let index = 0; index < this.data.length; index++ ){ + for (let index = 0; index < this.data.length; index++) { if (list.includes(this.data[index].name)) { console.log("Added game count to " + this.data[index].name); this.data[index].games += 1; @@ -145,7 +149,7 @@ export class RegularManager extends GuestManager { return new Regular(id, status, level, games, firstName, lastName); } reset() { - for (let index = 0; index < this.data.length; index++ ){ + for (let index = 0; index < this.data.length; index++) { this.data[index].games = 0; this.data[index].status = false; } @@ -177,6 +181,10 @@ function parseCsv(data) { return players; } +document.getElementById("button-player-load").addEventListener("click", () => { + document.getElementById("player-load").click(); +}); + function addLoadBehaviour(p) { const f = document.getElementById("player-load"); f.addEventListener("change", () => { -- cgit v1.3.1