User:Invitatious/highlightsig.js
From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. In Internet Explorer and Firefox, hold down the Ctrl key and click the Refresh or Reload button. Opera users have to clear their caches through Tools→Preferences, see the instructions for Opera. Konqueror and Safari users can just click the Reload button.
//<pre><nowiki> addOnloadHook(function() { function ebcn(clsName) { var arr = new Array(); var elems = document.getElementsByTagName("span"); // CHANGE TO ELEMENT USED FOR CLASS var elem; for (var i = 0; (elem = elems[i]); i++) { if (elem.className == clsName) { arr[arr.length] = elem; } } return arr; } var sigs = ebcn("sigInvitatious"); // CHANGE ACCORDING TO USERNAME for (var i = 0; i < sigs.length; i++) { sigs[i].className = ""; sigs[i].parentNode.className = "commentInvitatious" // CHANGE ACCORDING TO USERNAME } }); //</nowiki></pre>