User:Splarka/monobook.js

// ** patrolled edit popups ** // Lets you open patrolled edit links in popups which will autoclose when complete. // Set popups to open in new tabs for best results. function patrolpop { if( (!document.getElementById)||(!queryString("diff"))||(!queryString("rcid")) ) return;

if(document.getElementsByTagName("table")[0].className = "diff") { var marklink = document.getElementsByTagName("table")[0].getElementsByTagName("a").length -1; var purl = document.getElementsByTagName("table")[0].getElementsByTagName("a")[marklink].href var mp = document.getElementsByTagName("table")[0].getElementsByTagName("a")[marklink].parentNode var mpa=document.createElement('span'); mpa.innerHTML='&emsp;[pop]'; mp.appendChild(mpa); document.getElementById("poppatrol").accessKey="p"; } } $(document).ready(patrolpop);

// window closer and query string retriever if( queryString("autoclose") == "true") window.close; function queryString(p) { var re = RegExp('[&?]' + p + '=([^&]*)'); var matches; if (matches = re.exec(document.location)) { try { return decodeURI(matches[1]); } catch (e) { }	}	return null; } // ** end patrolled edit popups **