User:Bluefire2/Scripts/welcome.js

function getParameterByName(name) { name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); var regexS = "[\\?&]" + name + "=([^&#]*)"; var regex = new RegExp(regexS); var results = regex.exec(window.location.search); if(results == null) { return ""; }	else { return decodeURIComponent(results[1].replace(/\+/g, " ")); } } var str = window.location.href; window.onload = function { if((str.substring(str.length-20, str.length) == "Special:Log/newusers") || (wgPageName == "Special:Log" && getParameterByName("type") == "newusers")) { var foo = document.getElementsByTagName("a"); for(var i = 0; i < foo.length; i++) { foo[i].setAttribute('target', '_blank'); }	} } importScript('User:Quarenon/autowelcome.js')