From 5f8360841506d14f270729d01ca7bac48dc0a272 Mon Sep 17 00:00:00 2001 From: ReznoRMichael Date: Sun, 6 Sep 2020 02:11:23 +0200 Subject: [PATCH] locations now hidden by default --- HKCheckCompletion.js | 16 +++++++--------- index.html | 6 +----- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/HKCheckCompletion.js b/HKCheckCompletion.js index f8c551f..81f5220 100644 --- a/HKCheckCompletion.js +++ b/HKCheckCompletion.js @@ -332,7 +332,7 @@ function HKCheckCompletion(jsonObject) { // Prevents wrong checkbox behaviour CheckboxHintsToggle("hide"); - CheckboxLocationsToggle("show"); + CheckboxLocationsToggle("hide"); // Pre-Cleaning and filling initial data PrefillHTML(DIV_ID); @@ -397,10 +397,6 @@ function HKCheckCompletion(jsonObject) { document.getElementById(DIV_ID.intro.id).innerHTML += divStart + icon + textFill + divEnd; } - // ---------------- Hints --------------------- // - - // function CheckHints() - // ---------------- Bosses (Base Game) --------------------- // if (HK_BOSSES_temp) CheckIfDataTrue(DIV_ID.bosses, HK_BOSSES_temp, HKPlayerData); @@ -544,7 +540,7 @@ function FillHTML(divId, textPrefix = "Unknown Completion Element: ", textSuffix let b = ["", ""]; if (!textPrefix.length) b = ["", ""]; - let span = ["", ""]; + let span = [""]; if (divId === DIV_ID.hints) { span[0] = ""; icon = SYMBOL_INFO; @@ -856,7 +852,7 @@ function InitialHTMLPopulate(divIdObj) { } /** - * Toggles display of "hk-hints". On click or when called with a parameter + * Toggles display of "hk-hints". On click with no parameters or on demand when called with a parameter * @param {string} param "hide", "show" or none (optional) */ function CheckboxHintsToggle(param) { @@ -884,6 +880,10 @@ function CheckboxHintsToggle(param) { } } +/** + * Toggles display of ".location" class. On click with no parameters or on demand when called with a parameter + * @param {string} param "hide", "show" or none (optional) + */ function CheckboxLocationsToggle(param) { let checkboxId = document.getElementById("checkbox-locations"); let allClassElements = document.querySelectorAll(".location"); @@ -917,6 +917,4 @@ function CheckboxLocationsToggle(param) { checkboxId.value = "locations-on"; } } - - } \ No newline at end of file diff --git a/index.html b/index.html index 87ce5b6..d919069 100644 --- a/index.html +++ b/index.html @@ -25,13 +25,9 @@
@@ -58,7 +54,7 @@ Hints