User:Kingpin13/welcomer.js

//COPIED FROM User:Airplaneman/welcomer.js //if(wgNamespaceNumber == -1 && wgCanonicalSpecialPageName) $(talklinkWelcomizer)

function talklinkWelcomizer { appendCSS('a.welcometalklink {color:#ff00ff;font-weight:normal }'); // appendCSS('ul.special li a[title ="Special:Contributions"] + a[title ^="User talk:"].new { color:#CC2200;font-weight:normal }'); var docobj = document.getElementById('bodyContent') || document.getElementById('content') || document.getElementById('mw-content') || document.body; var a = getElementsByClassName(docobj,'a','new'); var utpat = /title\=[uU]ser_talk\:/ for(var i=0;i<a.length;i++) { var href = a[i].getAttribute('href',2); var frag = (href.indexOf('?') == -1) ? '?' : '&';   if(utpat.test(href)) { a[i].setAttribute('href',href + frag + 'preload=User:Airplaneman/welcomer.js/preload'); a[i].className += " welcometalklink"; document.getElementById("wpSummary").value = "Welcoming user to Wikipedia"; } } } // with thanks to User:Splarka -- epic guru of funky javascript -- and thanks to simple:User:Microchip08 for letting me borrow this for en wiki