Fix screwed up links, add possible highlight overwrite

This commit is contained in:
Bingus_Violet 2024-02-13 08:55:52 -06:00
parent 9ac680d5af
commit 48ea1dbd7f
2 changed files with 6 additions and 3 deletions

View file

@ -56,7 +56,10 @@ function converter(html) {
for (let index = 0; index < highTable.length; index++) { for (let index = 0; index < highTable.length; index++) {
var term = highTable[index]; var term = highTable[index];
var replacement = `<span style="color: ${highlightedWords[term]}">${term}</span>` var replacement = `<span style="color: ${highlightedWords[term]}">${term}</span>`
bodyHTML = bodyHTML.replaceAll(`{${term}}`, "TEMPORARY_REPLACE")
bodyHTML = bodyHTML.replaceAll(term, replacement) bodyHTML = bodyHTML.replaceAll(term, replacement)
bodyHTML = bodyHTML.replaceAll("TEMPORARY_REPLACE", `{${term}}`)
} }
html = html.substring(0, html.indexOf("<body>")) + bodyHTML + html.substring(html.indexOf("</body>") + 7) html = html.substring(0, html.indexOf("<body>")) + bodyHTML + html.substring(html.indexOf("</body>") + 7)

View file

@ -57,15 +57,15 @@
<div class="grid-child"> <div class="grid-child">
<div> <div>
<h3>Coding</h3> <h3>Coding</h3>
<a class="chip" href="https://codeberg.org/Bingus_Violet">Codeberg</a> <a class="chip" href="https://codeberg.org/Bingus_violet">Codeberg</a>
<a class="chip" href="https://hub.docker.com/u/bingusviolet">Docker</a> <a class="chip" href="https://hub.docker.com/u/bingusviolet">Docker</a>
<a class="chip" href="https://github.com/Violets-puragtory">Github</a> <a class="chip" href="https://github.com/violets-puragtory">Github</a>
</div> </div>
</div> </div>
<div class="grid-child"> <div class="grid-child">
<div> <div>
<h3>Games</h3> <h3>Games</h3>
<a class="chip" href="https://steamcommunity.com/id/Violet-The-Thigh-high-obtainer/">Steam</a> <a class="chip" href="https://steamcommunity.com/id/violet-The-Thigh-high-obtainer/">Steam</a>
</div> </div>
</div> </div>
</main> </main>