User:PaineOrange/monobook.js

var curLink = 0; var linkCount = 0; var linkFind = unescape("%3Ftitle%3DUser_talk%3A");

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; }

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 = "hello" document.editform.submit; } }