User:Alexia Death/monobook.js

addOnloadHook(estRelated); function estRelated { if (document.URL.indexOf('Special:Watchlist') == -1) return; estaj=sajax_init_object(null); estaj.open("GET", "http://en.wikipedia.org/w/index.php?title=Special:Recentchangeslinked&target=Wikipedia:WikiProject_Estonia/EA&hideminor=0&days=1&limit=50", true); estaj.onreadystatechange = function {   if(estaj.readyState != 4) return; sPage = estaj.responseText; document.getElementById("contentSub").innerHTML = sPage.substring(sPage.indexOf(" "), sPage.indexOf(' ') - 25); }; estaj.send(null); }

addOnloadHook(doQuickCount); function doQuickCount { if (wgPageName == "Special:Contributions") { var name = document.getElementById("contentSub").getElementsByTagName("a"); var rname = name[0].innerHTML; if (rname == "Talk") return; //IP var cnteraj = sajax_init_object(null); cnteraj.open("GET", 'http://en.wikipedia.org/w/query.php?what=contribcounter&'+     'titles=User:'+rname+'&format=xml', true); cnteraj.onreadystatechange = function {     if(cnteraj.readyState != 4) return; document.getElementById("contentSub").innerHTML = 'Edit count for ' + rname.fontcolor("Green").bold + ": " + cnteraj.responseText.split(" ")[1].split(" ")[0].fontcolor("Maroon").bold + " " + document.getElementById("contentSub").innerHTML; };   cnteraj.send(null); } }