aboutsummaryrefslogtreecommitdiff
path: root/src/manage.js
diff options
context:
space:
mode:
authorKaran Jayachandra <mail@karanjayachandra.com>2025-11-15 20:09:51 +0100
committerKaran Jayachandra <mail@karanjayachandra.com>2025-11-15 20:09:51 +0100
commit4ff9794fa2b545134efe341ad012667c67f70d15 (patch)
tree52675a68a49928cee6e13044f1e66309a30155ce /src/manage.js
parent7cec8794b6616d294b6a0e8aab3b9d8b1dcdb6db (diff)
Added the changes to include the game counting
Diffstat (limited to 'src/manage.js')
-rw-r--r--src/manage.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/manage.js b/src/manage.js
index f8fe220..6ed58bd 100644
--- a/src/manage.js
+++ b/src/manage.js
@@ -38,7 +38,7 @@ export class Manager {
return i.render();
})
.join("");
- let elementId = this.data[0].description + "_list";
+ let elementId = this.data[0].description + "-list";
document.getElementById(elementId).innerHTML = renderedHTML;
this.addBehaviour();
}
@@ -111,12 +111,14 @@ export class GuestManager extends Manager {
active() {
return normalize(super.active());
}
- update(list) {
+ incrementGames(list) {
for (let index = 0; index < this.data.length; index++ ){
- if (this.data[index].name in list) {
+ if (list.includes(this.data[index].name)) {
+ console.log("Added game count to " + this.data[index].name);
this.data[index].games += 1;
}
}
+ this.store();
}
}