User:Oluwa2Chainz/monobook.js

// User:Lupin/popups.js

// importScript('User:Lupin/popups.js');

window.popupFixRedirs = true; window.popupFixDabs = true;

function addOnloadHandler(fn) { if (typeof(window.onload) == "function") { var oldHandler = window.onload; window.onload = function { oldHandler; fn; } }  else window.onload = fn; }

/* if (navigator.appName != "Microsoft Internet Explorer") { importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu'); importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css');

importScript('User:AzaToth/twinkle.js');

addOnloadHandler(   function {      TwinkleConfig.watchSpeedyPages = [ 'g1', 'g2', 'g3', 'g4', 'g5', 'g6',        'g7', 'g8', 'g9', 'g10', 'g11', 'g12', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7' ];      twinklexfd.callbacks.afd.todaysList = function( self ) {			var form = self.responseXML.getElementById('editform');			var old_text = form.wpTextbox1.value;			var text = old_text.replace( /(<\!-- Add new entries to the TOP of the following list -->\n+)/, "$1\{\{subst:afd3|pg=" + wgPageName + self.params.numbering + "\}\}\n");			if( text == old_text ) {				self.statelem.error( 'failed to find target spot for the discussion' );				return;			}			var postData = {				'wpMinoredit': form.wpMinoredit.checked ? '' : undefined,				'wpWatchthis': undefined,				'wpStarttime': form.wpStarttime.value,				'wpEdittime': form.wpEdittime.value,				'wpAutoSummary': form.wpAutoSummary.value,				'wpEditToken': form.wpEditToken.value, 'wpSection': form.wpSection.value, 'wpSummary': "Adding \[\[Wikipedia:Articles for deletion/" + wgPageName + self.params.numbering + '\]\].' + TwinkleConfig.summaryAd, 'wpTextbox1': text };			self.post( postData ); }; twinklearv.callbacks.aiv = function( self ) { uid = self.params.uid; reason = self.params.reason; var form = self.responseXML.getElementById('editform'); if( !form ) { self.statelem.error( 'Failed to retrieve edit form.' ); return; }		var text = form.wpTextbox1.value; var re = new RegExp( "\\{\\{\\s*(?:(?:[Ii][Pp])?[Vv]andal|[Uu]serlinks)\\s*\\|\\s*(?:1=)?\\s*" + RegExp.escape( uid, true ) + "\\s*\\}\\}" ); var myArr; if( ( myArr = re.exec( text ) ) ) { self.statelem.info( 'Report already present, will not add a new one' ); return; }		self.statelem.status( 'Adding new report...' ); var postData = { 'wpMinoredit': ( form.wpMinoredit.checked || TwinkleConfig.markAIVReportAsMinor ) ? '' : undefined, 'wpWatchthis': undefined, 'wpStarttime': form.wpStarttime.value, 'wpEdittime': form.wpEdittime.value, 'wpAutoSummary': form.wpAutoSummary.value, 'wpEditToken': form.wpEditToken.value, 'wpSection': form.wpSection.value, 'wpSummary': 'Reporting ' + uid + '.'+ TwinkleConfig.summaryAd, 'wpTextbox1': text + '*\{\{' + ( isIPAddress( uid ) ? 'IPvandal' : 'vandal' ) + '|' + (/\=/.test( uid ) ? '1=' :  ) + uid + '\}\} - ' + reason + ' ' +  };		self.post( postData ); }; twinklearv.callbacks.username = function( self ) { uid = self.params.uid; reason = self.params.reason; var form = self.responseXML.getElementById('editform'); if( !form ) { self.statelem.error( 'Failed to retrieve edit form.' ); return; }		var text = form.wpTextbox1.value; if (new RegExp( "\\{\\{\\s*user-uaa\\s*\\|\\s*(1\\s*=\\s*)?" + RegExp.escape(uid, true) + "\\s*(\\||\\})" ).test(text)) { self.statelem.error( 'User is already listed.' ); return; }		self.statelem.status( 'Adding new report...' ); var postData = { 'wpMinoredit': ( form.wpMinoredit.checked || TwinkleConfig.markUAAReportAsMinor ) ? '' : undefined, 'wpWatchthis': undefined, 'wpStarttime': form.wpStarttime.value, 'wpEdittime': form.wpEdittime.value, 'wpAutoSummary': form.wpAutoSummary.value, 'wpEditToken': form.wpEditToken.value, 'wpSection': form.wpSection.value, 'wpSummary': 'Reporting ' + uid + '.'+ TwinkleConfig.summaryAd, 'wpTextbox1': text.replace( /-->/, "-->\n" + reason.replace( '\$', "$$$$" ) ) };		self.post( postData ); };   }  );  importScript('Wikipedia:WikiProject Deletion sorting/delsort.js');  addOnloadHandler( function { DelsortConfig['watchDelsortedLists'] = 0; } ); }

// BEGIN TEMPLATEFINDER *************************************

function findTemplates { location.href = "http://en.wikipedia.org/wiki/Special:PrefixIndex/" + document.getElementById("templatePrefix").getAttribute("value"); }

// END TEMPLATEFINDER ************************************* // **BROKEN** importScript('User:Largoplazo/watchpoint.js');

//var mainHeader = document.getElementsByTagName("h1")[0]; //var mhSpan = document.createElement("span"); //mhSpan.className = "editSection"; //alert("C"); //mhSpan.appendChild(document.createTextNode("Blah")); //alert("D"); //document.getElementsByTagName("h1")[0].appendChild(mhSpan); //alert("E"); importScript('User:Ohconfucius/script/MOSNUM dates.js'); // User:Ohconfucius/script/MOSNUM dates.js

importScript('User:Mr.Z-man/closeAFD.js');