From e7d0e7e59a0a0616a92f8e1c919f8178396dbc02 Mon Sep 17 00:00:00 2001 From: ReznoRMichael Date: Tue, 25 Aug 2020 00:16:28 +0200 Subject: [PATCH] safety pre-cleaning, object copy bosses --- HKCheckCompletion.js | 9 +++++++- index.html | 50 ++++++++++++++++++-------------------------- 2 files changed, 28 insertions(+), 31 deletions(-) diff --git a/HKCheckCompletion.js b/HKCheckCompletion.js index 22e36c4..a0db317 100644 --- a/HKCheckCompletion.js +++ b/HKCheckCompletion.js @@ -103,6 +103,13 @@ const HK_SPELLS = { function HKCheckCompletion(jsonObject) { + // Pre-Cleaning for safety + for (i in DIV_ID) { + document.getElementById(DIV_ID[i]).innerHTML = ""; + } + + let HK_BOSSES_temp = Object.assign({}, HK_BOSSES); + let HKPlayerData = jsonObject.playerData; for (i in HKPlayerData) { @@ -119,7 +126,7 @@ function HKCheckCompletion(jsonObject) { // ---------------- Bosses (Base Game) --------------------- // - checkIfDataTrue(DIV_ID.bosses, HK_BOSSES, HKPlayerData); + checkIfDataTrue(DIV_ID.bosses, HK_BOSSES_temp, HKPlayerData); // ---------------- Colosseum of Fools --------------------- // diff --git a/index.html b/index.html index b96c7b9..a73e3dd 100644 --- a/index.html +++ b/index.html @@ -46,45 +46,35 @@
-
-

Game Completion Status

-
+

Game Completion Status

+
-
-

Bosses:

-
+

Bosses:

+
-
-

Colosseum of Fools:

-
+

Colosseum of Fools:

+
-
-

Dreamers:

-
+

Dreamers:

+
-
-

Dream Nail and Essence:

-
+

Dream Nail and Essence:

+
-
-

Equipment:

-
+

Equipment:

+
-
-

Mask Shards:

-
+

Mask Shards:

+
-
-

Nail Arts:

-
+

Nail Arts:

+
-
-

Nail Upgrades:

-
+

Nail Upgrades:

+
-
-

Spells:

-
+

Spells:

+
\ No newline at end of file