User:FayssalF/monobook.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// [[User:Lupin/popups.js]] - please include this line 

document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
addOnloadHook(function (){
		if(queryString("submitdelete")=="true") document.forms[0].wpConfirmB.click();
	});
	function queryString(p) {
		var re = RegExp('[&?]' + p + '=([^&]*)');
		var matches;
		if (matches = re.exec(document.location)) {
			try { 
				return decodeURI(matches[1]);
			} catch (e) {
			}
		}
		return null;
	};