diff --git a/src/js/page-functions.js b/src/js/page-functions.js index 1906215..500431f 100644 --- a/src/js/page-functions.js +++ b/src/js/page-functions.js @@ -134,6 +134,41 @@ function CompletionHTML(jsObj, hkGameCompletion) { } } + +/* ################################### Optimized Functions ###################################### */ + + +function GenerateInnerHTML(hkdb) { + + console.log(hkdb); + + let finalHTMLFill = ""; + let textFill = ""; + let sections = hkdb.DIV_ID; + + for (let section in sections) { + + /* creates a h2 tag for the current section and fills with current%/max% */ + textFill = CompletionFill(sections[section]); + + switch (section) { + + case "intro": + + + + break; + default: + } + + finalHTMLFill += textFill; + + } + + console.log(finalHTMLFill); + +} + /** * Replaces the h2 titles with a current percent/max percent values as read from the save file * @param {object} jsObj Object with HTML data to fill @@ -190,36 +225,6 @@ function CompletionHTML(jsObj, hkGameCompletion) { } -function GenerateInnerHTML(hkdb) { - - console.log(hkdb); - - let finalHTMLFill = ""; - let textFill = ""; - let sections = hkdb.DIV_ID; - - for (let section in sections) { - - textFill = CompletionFill(sections[section]); - - switch (section) { - - case "intro": - - - - break; - default: - } - - finalHTMLFill += textFill; - - } - - console.log(finalHTMLFill); - -} - /** * Adds HTML string to an element with a given ID. * @param {object} divId object containing div ID of the HTML element to append to