mirror of
https://github.com/ivabus/www
synced 2024-11-22 07:15:07 +03:00
Script was breaking hyperlinks
This commit is contained in:
parent
843aa6a5c5
commit
1121ca0fdb
1 changed files with 0 additions and 19 deletions
|
@ -146,25 +146,6 @@
|
|||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/numeral.js/2.0.6/numeral.min.js"></script>
|
||||
|
||||
<script>
|
||||
window.onload = function() {
|
||||
// Get all the <p> elements
|
||||
var paragraphs = document.getElementsByTagName('p');
|
||||
|
||||
// Loop through each <p> element
|
||||
for (var i = 0; i < paragraphs.length; i++) {
|
||||
// Get the text content of the <p> element
|
||||
var text = paragraphs[i].textContent;
|
||||
|
||||
// Replace every instance of the word 'tea' with the word wrapped in a span with a class of 'highlight'
|
||||
var highlightedText = text.replace(/tea/g, '<span class="highlight">tea</span>');
|
||||
|
||||
// Set the HTML of the <p> element to the highlighted text
|
||||
paragraphs[i].innerHTML = highlightedText;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.highlight {
|
||||
font-family: "sono", sans-serif !important;
|
||||
|
|
Loading…
Reference in a new issue