MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 72: Line 72:
                     if (nodeText.match(regex)) {
                     if (nodeText.match(regex)) {
                         // Create a new HTML string with the name wrapped in a <span> element
                         // Create a new HTML string with the name wrapped in a <span> element
                         var highlightedText = nodeText.replace(regex, '<span style="color: purple;">$&</span>');
                         var highlightedText = nodeText.replace(regex, '<span style="color: #c846ff;">$&</span>');
              
              
                         // Update the node's HTML with the highlighted text
                         // Update the node's HTML with the highlighted text