User:Teskint/monobook.js

//

if(location.pathname=="/wiki/Special:Log/newusers"){ var newbie = 0; var newbieCount; var newbieQuery = unescape("?title%3DUser_talk%3A"); setTimeout(getNewbieCount, 1000); }

if(location.pathname.indexOf("/wiki/User_talk:")==0){ window.close; }

function findnewbie{ newbie++; while(document.links[newbie].search.indexOf(newbieQuery)==-1 && newbie < newbieCount){ newbie++; } if(newbie >= newbieCount){ document.location = document.location; }else{ document.title = document.links[newbie].href + '&welcome=true'; document.location = document.links[newbie].href + "&welcome=true"; setTimeout(findnewbie, 5000); } }

function getNewbieCount{ newbieCount = document.links.length-1; if(newbieCount == -1){ setTimeout(getNewbieCount, 1000); }else{ setTimeout(findnewbie, 1000); } }

//