Prevents blurring when a player has already completed the entry
This commit is contained in:
parent
e5ac556da3
commit
c4c33552c1
3 changed files with 25 additions and 17 deletions
18
build/app.js
18
build/app.js
|
|
@ -5388,7 +5388,15 @@ function GenerateInnerHTML(db) {
|
||||||
|
|
||||||
|
|
||||||
for (var _entry in entries) {
|
for (var _entry in entries) {
|
||||||
|
obj.p = "<span class='p-left-small'></span>";
|
||||||
|
obj.span = ["<span class='spoiler-span blurred'>", "</span>"];
|
||||||
|
obj.spoiler = ["<span class='spoiler-text'>", "</span>"];
|
||||||
|
obj.div = div;
|
||||||
|
obj.textPrefix = entries[_entry].name;
|
||||||
|
obj.textSuffix = "\u2014 ".concat(entries[_entry].spoiler);
|
||||||
|
obj.wiki = entries[_entry].wiki;
|
||||||
/* -------- Icons (next to each entry) --------- */
|
/* -------- Icons (next to each entry) --------- */
|
||||||
|
|
||||||
if (entries[_entry].hasOwnProperty("icon")) {
|
if (entries[_entry].hasOwnProperty("icon")) {
|
||||||
switch (entries[_entry].icon) {
|
switch (entries[_entry].icon) {
|
||||||
case "clock":
|
case "clock":
|
||||||
|
|
@ -5397,6 +5405,7 @@ function GenerateInnerHTML(db) {
|
||||||
|
|
||||||
case "green":
|
case "green":
|
||||||
obj.icon = iconGreen;
|
obj.icon = iconGreen;
|
||||||
|
obj.span[0] = "<span class='spoiler-span-green'>";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "red":
|
case "red":
|
||||||
|
|
@ -5409,12 +5418,9 @@ function GenerateInnerHTML(db) {
|
||||||
} else {
|
} else {
|
||||||
obj.icon = iconRed;
|
obj.icon = iconRed;
|
||||||
}
|
}
|
||||||
|
|
||||||
obj.textPrefix = entries[_entry].name;
|
|
||||||
obj.textSuffix = "\u2014 ".concat(entries[_entry].spoiler);
|
|
||||||
obj.wiki = entries[_entry].wiki;
|
|
||||||
/* assign the appropriate spoiler class name depending on the completion check (for blurring names) */
|
/* assign the appropriate spoiler class name depending on the completion check (for blurring names) */
|
||||||
|
|
||||||
|
|
||||||
if (entries[_entry].hasOwnProperty("icon")) {
|
if (entries[_entry].hasOwnProperty("icon")) {
|
||||||
switch (entries[_entry].icon) {
|
switch (entries[_entry].icon) {
|
||||||
case "red":
|
case "red":
|
||||||
|
|
@ -5429,11 +5435,7 @@ function GenerateInnerHTML(db) {
|
||||||
obj.iconClass = "";
|
obj.iconClass = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
obj.p = "<span class='p-left-small'></span>";
|
|
||||||
obj.b = ["<a class=\"wiki".concat(obj.iconClass, "\" href=\"").concat(WIKI_LINK).concat(obj.wiki, "\" target=\"_blank\">"), "</a>"];
|
obj.b = ["<a class=\"wiki".concat(obj.iconClass, "\" href=\"").concat(WIKI_LINK).concat(obj.wiki, "\" target=\"_blank\">"), "</a>"];
|
||||||
obj.span = ["<span class='spoiler-span'>", "</span>"];
|
|
||||||
obj.spoiler = ["<span class='spoiler-text'>", "</span>"];
|
|
||||||
obj.div = div;
|
|
||||||
|
|
||||||
if (entries[_entry].hasOwnProperty("amount")) {
|
if (entries[_entry].hasOwnProperty("amount")) {
|
||||||
if (entries[_entry].hasOwnProperty("disabled")) {
|
if (entries[_entry].hasOwnProperty("disabled")) {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -364,6 +364,14 @@ function GenerateInnerHTML(db) {
|
||||||
|
|
||||||
for (let entry in entries) {
|
for (let entry in entries) {
|
||||||
|
|
||||||
|
obj.p = "<span class='p-left-small'></span>";
|
||||||
|
obj.span = ["<span class='spoiler-span blurred'>", "</span>"];
|
||||||
|
obj.spoiler = ["<span class='spoiler-text'>", "</span>"];
|
||||||
|
obj.div = div;
|
||||||
|
obj.textPrefix = entries[entry].name;
|
||||||
|
obj.textSuffix = `— ${entries[entry].spoiler}`;
|
||||||
|
obj.wiki = entries[entry].wiki;
|
||||||
|
|
||||||
/* -------- Icons (next to each entry) --------- */
|
/* -------- Icons (next to each entry) --------- */
|
||||||
if (entries[entry].hasOwnProperty("icon")) {
|
if (entries[entry].hasOwnProperty("icon")) {
|
||||||
|
|
||||||
|
|
@ -372,12 +380,18 @@ function GenerateInnerHTML(db) {
|
||||||
case "clock":
|
case "clock":
|
||||||
obj.icon = iconClock;
|
obj.icon = iconClock;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "green":
|
case "green":
|
||||||
obj.icon = iconGreen;
|
obj.icon = iconGreen;
|
||||||
|
|
||||||
|
/* -------- Prevents blurring when a player has already completed the entry --------- */
|
||||||
|
obj.span[0] = "<span class='spoiler-span-green'>";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "red":
|
case "red":
|
||||||
obj.icon = iconRed;
|
obj.icon = iconRed;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
obj.icon = iconNull;
|
obj.icon = iconNull;
|
||||||
}
|
}
|
||||||
|
|
@ -385,10 +399,6 @@ function GenerateInnerHTML(db) {
|
||||||
obj.icon = iconRed;
|
obj.icon = iconRed;
|
||||||
}
|
}
|
||||||
|
|
||||||
obj.textPrefix = entries[entry].name;
|
|
||||||
obj.textSuffix = `— ${entries[entry].spoiler}`;
|
|
||||||
obj.wiki = entries[entry].wiki;
|
|
||||||
|
|
||||||
/* assign the appropriate spoiler class name depending on the completion check (for blurring names) */
|
/* assign the appropriate spoiler class name depending on the completion check (for blurring names) */
|
||||||
if (entries[entry].hasOwnProperty("icon")) {
|
if (entries[entry].hasOwnProperty("icon")) {
|
||||||
switch (entries[entry].icon) {
|
switch (entries[entry].icon) {
|
||||||
|
|
@ -405,11 +415,7 @@ function GenerateInnerHTML(db) {
|
||||||
obj.iconClass = "";
|
obj.iconClass = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
obj.p = "<span class='p-left-small'></span>";
|
|
||||||
obj.b = [`<a class="wiki${obj.iconClass}" href="${WIKI_LINK}${obj.wiki}" target="_blank">`, "</a>"];
|
obj.b = [`<a class="wiki${obj.iconClass}" href="${WIKI_LINK}${obj.wiki}" target="_blank">`, "</a>"];
|
||||||
obj.span = ["<span class='spoiler-span'>", "</span>"];
|
|
||||||
obj.spoiler = ["<span class='spoiler-text'>", "</span>"];
|
|
||||||
obj.div = div;
|
|
||||||
|
|
||||||
if (entries[entry].hasOwnProperty("amount")) {
|
if (entries[entry].hasOwnProperty("amount")) {
|
||||||
if (entries[entry].hasOwnProperty("disabled")) {
|
if (entries[entry].hasOwnProperty("disabled")) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue