User:Kumatch/global.js

function setupWarDBTooltips { document.write(" "); } window.onload = function { var linkTags = document.getElementsByTagName('a'); for (var i = 0; i < linkTags.length; i++) { if (!linkTags[i].hasAttribute('href')) continue; var linkHref = linkTags[i].getAttribute('href'); if (linkHref.indexOf('http://www.wardb.com/item.aspx') == 0           || linkHref.indexOf('http://www.wardb.com/spell.aspx') == 0            || linkHref.indexOf('http://www.wardb.com/quest.aspx') == 0            || linkHref.indexOf('http://www.wardb.com/npc.aspx') == 0            ) { linkTags[i].setAttribute("class", "wardb-spell-full-small"); }   } }; setupWarDBTooltips;