User:Arkalor's Bot/global.js

importArticles({   type: "script",    articles: [        "u:dev:ListFiles/code.js",        "u:dev:AjaxBatchDelete/code.2.js"    ] });

//

/* skin change buttons */ function CreateSkinChangeButtons { //Oasis buttons $('section header div.buttons a:first-child').before('MonobookVector'); //Monobook buttons $('div#p-cactions.portlet div.pBody ul li:nth-last-child(1)').after('OasisVector'); } addOnloadHook(CreateSkinChangeButtons);

In other languages

Deutsch Español Français Magyar Italiano 日本語 한국어 Nederlands Polski Português do Brasil Русский 中文

Note: After saving, you may have to bypass your browser's cache to see the changes.

Firefox / Safari: Hold ⇧ Shift while clicking Reload, or press either Ctrl+F5 or Ctrl+R (⌘ Cmd+R on a Mac) Google Chrome: Press Ctrl+⇧ Shift+R (⌘ Cmd+⇧ Shift+R on a Mac) Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl+F5 Opera: Clear the cache in Tools → Preferences

/** * Page loader * * Allows a page to be downloaded and displayed on demand. * Use with Template:LoadPage and Template:LoadBox */ ( function {	var $loadPage = $content.find( '.load-page' );	if ( !$loadPage.length ) {		return;	}	// We need the spinner to show loading is happening, but we don't want	// to have a delay while the module downloads, so we'll load this now,	// regardless of if something is clicked	mw.loader.load( 'jquery.spinner' );	var $buttonText = $( ' ' ).addClass( 'mw-editsection-like load-page-button' )		.append( '[', $( ' ' ).addClass( 'jslink' ).text( mcw.i18n.hideText ), ']' );	$loadPage.find( '.mw-headline:first' ).each( function { var $body = $( this ).closest( '.load-page' ), $button = $buttonText.clone, firstWidth, secondWidth; // Add the button $button.insertAfter( this ); // Move the edit button to the right spot $body.find( '.mw-editsection' ).insertAfter( $button ); // Find max button width, and set its min-width to it		firstWidth = $button.width; $button.children( '.jslink' ).text( mcw.i18n.showText ); secondWidth = $button.width; if ( firstWidth !== secondWidth ) { if ( firstWidth > secondWidth ) { $button.css( 'min-width', firstWidth ); } else { $button.css( 'min-width', secondWidth ); }		}	} );	if ( mcw.events.loadPage ) {		return;	}	$( '#mw-content-text' ).on( 'click', '.load-page-button > .jslink', function { var $button = $( this ).parent, $body = $button.closest( '.load-page' ), $contentContainer = $body.find( '.load-page-content' ); if ( !$body.data( 'loaded' ) ) { var oldButton = $button.html; // Just in-case the spinner module is still not ready yet mw.loader.using( 'jquery.spinner', function {				$button.html( $.createSpinner );			} ); new mw.Api.get( {				action: 'parse',				prop: 'text',				title: mw.config.get( 'wgPageName' ),				text: '{' + '{:' + $body.data( 'page' ) + '}}'			} ).done( function( data ) {				$contentContainer.html( data.parse.text['*'] ).removeClass( 'noscript' );				// Fire content hook on the new content, running all this stuff again and more :) mw.hook( 'wikipage.content' ).fire( $contentContainer ); $button.html( oldButton ).children( '.jslink' ).text( mcw.i18n.hideText ); $body.data( 'loaded', true ); } ).fail( function( _, error ) { $button.html( oldButton ); var errorText = ''; if ( error.textStatus ) { errorText = error.textStatus; } else if ( error.error ) { errorText = error.error.info; }				mw.notify( errorText, { title: mcw.i18n.loadErrorTitle, autoHide: false } ); } );		} else if ( $( this ).text === mcw.i18n.showText ) {			$contentContainer.show;			$( this ).text( mcw.i18n.hideText );		} else {			$contentContainer.hide;			$( this ).text( mcw.i18n.showText );		}	} ); mcw.events.loadPage = true; } );