display intro section properly
This commit is contained in:
parent
3d0f1b1642
commit
d675c051be
3 changed files with 21 additions and 27 deletions
23
build/app.js
23
build/app.js
|
|
@ -2589,7 +2589,7 @@ var HK = {
|
|||
id: "timePlayed",
|
||||
icon: "clock",
|
||||
name: "Time Played:",
|
||||
spoiler: "0 h 0 min 0 sec",
|
||||
spoiler: "0 h 00 min 00 sec",
|
||||
timeH: 0,
|
||||
timeM: 0,
|
||||
timeS: 0
|
||||
|
|
@ -5066,18 +5066,20 @@ function GenerateInnerHTML(db) {
|
|||
switch (section) {
|
||||
/* ############### Game Status (intro) ################ */
|
||||
case "intro":
|
||||
obj.b = ["", ""];
|
||||
obj.span = ["<b>", "</b>"];
|
||||
/* ############## Loop ############### */
|
||||
|
||||
/* ############## Looping entries (intro) ############### */
|
||||
for (var entry in entries) {
|
||||
obj.b = ["", ""];
|
||||
obj.span = ["<b>", "</b>"];
|
||||
obj.textPrefix = entries[entry].name;
|
||||
obj.textSuffix = entries[entry].spoiler;
|
||||
obj.spoilerAfter = "";
|
||||
/* Different text and images for each entry in the "Game Status" section */
|
||||
|
||||
switch (entries[entry].id) {
|
||||
switch (entry) {
|
||||
case "gameCompletion":
|
||||
obj.textSuffix = "".concat(obj.textSuffix, " %");
|
||||
obj.spoilerAfter = "</b> ".concat(entries[entry].spoilerAfter);
|
||||
obj.span[1] = "";
|
||||
break;
|
||||
|
||||
case "health":
|
||||
|
|
@ -5152,13 +5154,6 @@ function GenerateInnerHTML(db) {
|
|||
|
||||
default:
|
||||
}
|
||||
/* Optimized only for the "intro" section! */
|
||||
|
||||
|
||||
if (entries[entry].hasOwnProperty("spoilerAfter")) {
|
||||
obj.spoilerAfter = "</b> ".concat(entries[entry].spoilerAfter);
|
||||
obj.span[1] = "";
|
||||
}
|
||||
|
||||
textFill += SingleEntryFill(obj);
|
||||
}
|
||||
|
|
@ -5172,9 +5167,9 @@ function GenerateInnerHTML(db) {
|
|||
obj.span = ["<span>", "</span>"];
|
||||
obj.icon = iconNull;
|
||||
obj.textPrefix = "";
|
||||
obj.textSuffix = entries[sections[section].current].spoiler;
|
||||
/* display only one (current) hint */
|
||||
|
||||
obj.textSuffix = entries[sections[section].current].spoiler;
|
||||
textFill += SingleEntryFill(obj);
|
||||
break;
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -194,21 +194,25 @@ function GenerateInnerHTML(db) {
|
|||
/* ############### Game Status (intro) ################ */
|
||||
|
||||
case "intro":
|
||||
obj.b = ["", ""];
|
||||
obj.span = ["<b>", "</b>"];
|
||||
|
||||
/* ############## Loop ############### */
|
||||
/* ############## Looping entries (intro) ############### */
|
||||
|
||||
for (let entry in entries) {
|
||||
|
||||
obj.b = ["", ""];
|
||||
obj.span = ["<b>", "</b>"];
|
||||
|
||||
obj.textPrefix = entries[entry].name;
|
||||
obj.textSuffix = entries[entry].spoiler;
|
||||
obj.textSuffix = entries[entry].spoiler;
|
||||
obj.spoilerAfter = "";
|
||||
|
||||
/* Different text and images for each entry in the "Game Status" section */
|
||||
|
||||
switch (entries[entry].id) {
|
||||
switch (entry) {
|
||||
case "gameCompletion":
|
||||
obj.textSuffix = `${obj.textSuffix} %`;
|
||||
obj.spoilerAfter = `</b> ${entries[entry].spoilerAfter}`;
|
||||
obj.span[1] = "";
|
||||
|
||||
break;
|
||||
|
||||
|
|
@ -289,12 +293,6 @@ function GenerateInnerHTML(db) {
|
|||
default:
|
||||
}
|
||||
|
||||
/* Optimized only for the "intro" section! */
|
||||
if (entries[entry].hasOwnProperty("spoilerAfter")) {
|
||||
obj.spoilerAfter = `</b> ${entries[entry].spoilerAfter}`;
|
||||
obj.span[1] = "";
|
||||
}
|
||||
|
||||
textFill += SingleEntryFill(obj);
|
||||
}
|
||||
|
||||
|
|
@ -307,9 +305,10 @@ function GenerateInnerHTML(db) {
|
|||
obj.span = ["<span>", "</span>"];
|
||||
obj.icon = iconNull;
|
||||
obj.textPrefix = "";
|
||||
obj.textSuffix = entries[sections[section].current].spoiler;
|
||||
|
||||
/* display only one (current) hint */
|
||||
obj.textSuffix = entries[sections[section].current].spoiler;
|
||||
|
||||
textFill += SingleEntryFill(obj);
|
||||
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue