1/*--------------------------*/ 2/* Hight Light Text Script */ 3/*--------------------------*/ 4 5document.addEventListener('DOMContentLoaded', function() { 6 // Select all elements with the class 'script-text-highlight' 7 8 var elements = document.querySelectorAll('.text-rich-text'); 9 10 11 // Loop through each element and apply the text replacement 12 elements.forEach(function(element) { 13 // Use a regular expression to find the ## content ## 14 var elementText = element.innerHTML; 15 var newText = elementText.replace(/##(.*?)##/g, '<span class="text-highlight">$1</span>'); 16 17 // Update the element with the new content 18 element.innerHTML = newText; 19 }); 20 }); 21 22/*------------------------------------------------------*/ 23/* Highlight Text and Side Bar for Dynamic Colour ID */ 24/*------------------------------------------------------*/ 25 26// Update text color for elements with the ID "dynamicColor-font" 27var dynamicColorElements = document.querySelectorAll("#dynamicColor-font"); 28 29dynamicColorElements.forEach(function(dynamicColorElement) { 30 var color = dynamicColorElement.getAttribute("data-color"); 31 dynamicColorElement.style.color = color || "inherit"; 32}); 33 34// Update background color for elements with the ID "dynamicColor-bg" 35var dynamicBackgroundColorElements = document.querySelectorAll("#dynamicColor-bg"); 36 37dynamicBackgroundColorElements.forEach(function(dynamicBackgroundColorElement) { 38 var bgColor = dynamicBackgroundColorElement.getAttribute("data-color"); 39 dynamicBackgroundColorElement.style.backgroundColor = bgColor; 40});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.