AppendHTML move
This commit is contained in:
parent
217a041460
commit
1365ab3429
2 changed files with 11 additions and 9 deletions
|
|
@ -9,6 +9,7 @@ import HK from "./hk-database.js";
|
||||||
import {
|
import {
|
||||||
PrefillHTML,
|
PrefillHTML,
|
||||||
CompletionHTML,
|
CompletionHTML,
|
||||||
|
AppendHTML,
|
||||||
CheckboxHintsToggle,
|
CheckboxHintsToggle,
|
||||||
CheckboxSpoilersToggle,
|
CheckboxSpoilersToggle,
|
||||||
StorageAvailable
|
StorageAvailable
|
||||||
|
|
@ -268,15 +269,6 @@ function FillHTML(divId, textPrefix = "Unknown Completion Element: ", textSuffix
|
||||||
document.getElementById(divId.id).innerHTML += divStart + icon + b[0] + textPrefix + b[1] + span[0] + pSpan + spoilerSpan[0] + dash + textSuffix + spoilerSpan[1] + span[1] + divEnd;
|
document.getElementById(divId.id).innerHTML += divStart + icon + b[0] + textPrefix + b[1] + span[0] + pSpan + spoilerSpan[0] + dash + textSuffix + spoilerSpan[1] + span[1] + divEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 {string} content HTML contents to append
|
|
||||||
*/
|
|
||||||
function AppendHTML(divId, content) {
|
|
||||||
document.getElementById(divId.id).innerHTML += "\n" + content;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Switches global variable to a "completed" symbol. Adds +1 or +2 to percent property.
|
* Switches global variable to a "completed" symbol. Adds +1 or +2 to percent property.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,15 @@ function CompletionHTML(jsObj, hkGameCompletion) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 {string} content HTML contents to append
|
||||||
|
*/
|
||||||
|
function AppendHTML(divId, content) {
|
||||||
|
document.getElementById(divId.id).innerHTML += "\n" + content;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggles display of "hk-hints". On click with no parameters or on demand 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)
|
* @param {string} param "hide", "show" or none (optional)
|
||||||
|
|
@ -304,6 +313,7 @@ document.getElementById("checkbox-spoilers").addEventListener("click", CheckboxS
|
||||||
export {
|
export {
|
||||||
PrefillHTML,
|
PrefillHTML,
|
||||||
CompletionHTML,
|
CompletionHTML,
|
||||||
|
AppendHTML,
|
||||||
CheckboxHintsToggle,
|
CheckboxHintsToggle,
|
||||||
CheckboxSpoilersToggle,
|
CheckboxSpoilersToggle,
|
||||||
StorageAvailable
|
StorageAvailable
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue