User:Largoplazo/monobook.js

// User:Lupin/popups.js

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

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

/* 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');

$(   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=" + mw.config.get('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/" + mw.config.get('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");

// Display revision IDs in a page's history. $("#pagehistory li").prepend(function { return $(this).attr("data-mw-revid") + " "; });