no-unused-vars turn off
This commit is contained in:
parent
5885085d50
commit
2796e04204
2 changed files with 43 additions and 9 deletions
|
|
@ -11,5 +11,6 @@ module.exports = {
|
||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
"no-prototype-builtins": 0,
|
"no-prototype-builtins": 0,
|
||||||
|
"no-unused-vars": 0,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -171,19 +171,13 @@ function GenerateInnerHTML(hkdb) {
|
||||||
let finalHTMLFill = "";
|
let finalHTMLFill = "";
|
||||||
let textFill = "";
|
let textFill = "";
|
||||||
|
|
||||||
let icon = "";
|
|
||||||
let iconGreen = SYMBOL_TRUE;
|
|
||||||
let iconRed = SYMBOL_FALSE;
|
|
||||||
let iconClock = SYMBOL_CLOCK;
|
|
||||||
let iconNull = SYMBOL_EMPTY;
|
|
||||||
|
|
||||||
let textPrefix = "";
|
|
||||||
let textSuffix = "";
|
|
||||||
|
|
||||||
let sections = hkdb.SECTION;
|
let sections = hkdb.SECTION;
|
||||||
|
let entries = {};
|
||||||
|
|
||||||
for (let section in sections) {
|
for (let section in sections) {
|
||||||
|
|
||||||
|
entries = sections[section].entries;
|
||||||
|
|
||||||
/* starts a new <div> with the current section id */
|
/* starts a new <div> with the current section id */
|
||||||
textFill = SectionStart(sections[section]);
|
textFill = SectionStart(sections[section]);
|
||||||
|
|
||||||
|
|
@ -191,6 +185,10 @@ function GenerateInnerHTML(hkdb) {
|
||||||
textFill += CompletionFill(sections[section]);
|
textFill += CompletionFill(sections[section]);
|
||||||
|
|
||||||
/* create all main entries */
|
/* create all main entries */
|
||||||
|
for (let entry in entries) {
|
||||||
|
textFill += SingleEntryFill(entries[entry]);
|
||||||
|
}
|
||||||
|
|
||||||
switch (section) {
|
switch (section) {
|
||||||
|
|
||||||
case "intro":
|
case "intro":
|
||||||
|
|
@ -270,6 +268,41 @@ function SectionStart(section) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function SingleEntryFill(entry) {
|
||||||
|
|
||||||
|
let icon = "";
|
||||||
|
let iconGreen = SYMBOL_TRUE;
|
||||||
|
let iconRed = SYMBOL_FALSE;
|
||||||
|
let iconClock = SYMBOL_CLOCK;
|
||||||
|
let iconNull = SYMBOL_EMPTY;
|
||||||
|
|
||||||
|
let textPrefix = "";
|
||||||
|
let textSuffix = "";
|
||||||
|
let wiki = "";
|
||||||
|
|
||||||
|
let b = ["<b>", "</b>"];
|
||||||
|
if (!textPrefix.length) b = ["", ""];
|
||||||
|
if (wiki.length) b = [`<a class="wiki" href="${WIKI_LINK}${wiki}" target="_blank">`, "</a>"];
|
||||||
|
|
||||||
|
let span = ["<span class='spoiler-span'>", "</span>"];
|
||||||
|
let spoilerSpan = ["<span class='spoiler-text'>", "</span>"];
|
||||||
|
if (divId.id === "hk-hints") {
|
||||||
|
span[0] = "<span>";
|
||||||
|
icon = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// let dash = "";
|
||||||
|
if (textSuffix.length && textPrefix.length) textSuffix = "— " + textSuffix;
|
||||||
|
if (textPrefix.includes("<del>")) textSuffix = `<del>${textSuffix}</del>`;
|
||||||
|
|
||||||
|
return `
|
||||||
|
<div class='single-entry'>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds HTML string to an element with a given ID.
|
* Adds HTML string to an element with a given ID.
|
||||||
* @param {object} divId object containing div ID of the HTML element to append to
|
* @param {object} divId object containing div ID of the HTML element to append to
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue