Compare commits
3 commits
53314a14fb
...
3fd257cbe7
Author | SHA1 | Date | |
---|---|---|---|
3fd257cbe7 | |||
c574a2b48a | |||
86f6cd0ad9 |
3 changed files with 15 additions and 8 deletions
|
@ -156,13 +156,18 @@ function highlighter(json, full = true) {
|
|||
classes = `class="${classes}"`
|
||||
}
|
||||
|
||||
var replacement = `<span ${style} ${classes} ${link}>${startContent + highTable[index] + endContent}</span>`
|
||||
var stuff = (startContent + highTable[index] + endContent).trim()
|
||||
|
||||
if (!stuff.includes("span")) {
|
||||
var replacement = `<span ${style} ${classes} ${link}>${stuff}</span>`
|
||||
|
||||
if (link) {
|
||||
replacement = `<a href="${link}">${replacement}</a>`
|
||||
}
|
||||
|
||||
element.content = element.content.substring(0, spanStart) + replacement + element.content.substring(spanEnd)
|
||||
} else {
|
||||
element.content = element.content.replace(termKey, highTable[index])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
<p>I like the way it looks to have certain words be highlighted, makes it look fancier and easier to read (imo). So, when I remade this site, I went ahead and added an <em>Automatic Word Highlighting System!</em> This allows me have words automatically highlighted, on the server side, without having to do it in the code manually. Here's the current list of highlighted words:</p>
|
||||
<p class="textBlock">{ALL_HIGHLIGHTS}</p>
|
||||
<p>As time continues, more words are added to the highlighting list, and I'm slowly adding more features, like disabling case sensitivity, boldness, italics, outlines, and more.</p>
|
||||
<p>You may notice some highlighted words are "missing" on this list. This is because <em>characters adjacent to the highlighted word are highlighted, too!</em> What that means is, I can type HolyCowabungaILoveUltrakillItsSoEpic and it'll all be highlighted!</p>
|
||||
<p class="note">P.S. If you're wondering what YIP is for, its for YIPPEEEEEEEEEEEEEEEEEEEEEE!</p>
|
||||
<br>
|
||||
<h3>I thought the site doesn't use Javascript? So why is it there?</h3>
|
||||
<p>Originally, all my sites were completely Javascript free. As of late, though, I decided to add Javascript to this one. Javascript will <b><em>NEVER</em></b> be a requirement on this site. Javascript will ONLY be used where necessary, and I will do everything possible to make the experience indistinguishable.</p>
|
||||
|
|
|
@ -85,8 +85,8 @@
|
|||
<h1>Socials</h1>
|
||||
{PATH_SOCIALS}
|
||||
<br>
|
||||
<!-- <h1><hr>FAQ</h1>
|
||||
{PATH_FAQ} -->
|
||||
<h1><hr>FAQ</h1>
|
||||
{PATH_FAQ}
|
||||
|
||||
{SELECTED_VIDEO}
|
||||
|
||||
|
|
Loading…
Reference in a new issue