User:Darth Culator/global.js

// 

//Make sure "block email" is always checked and "anon only" is always unchecked by default on block pages //Adapted from w:c:starwars:User:Toprawa_and_Ralltiir/monobook.js and I have no clue where he got it. :P addOnloadHook(function{ var x; if (x=document.getElementById('wpEmailBan')) {x.checked=true;} }); addOnloadHook(function{ var x; if (x=document.getElementById('wpAnonOnly')) {x.checked=false;} }); addOnloadHook(function{ var x; if (x=document.getElementById('wpHardBlock')) {x.checked=true;} }); addOnloadHook(function{ var x; if (x=document.getElementById('wpAutoBlock')) {x.checked=true;} }); addOnloadHook(function{ var x; if (x=document.getElementById('wpCreateAccount')) {x.checked=true;} });

//Skin Switch Button for monobook to oasis and vice versa //and for monobook and oasis to wikiamobile //Imported from w:c:tardis:Forum:Easy_switching_between_monobook,_wikia_and_wikiamobile $( function {	if ( !document.getElementById( 'ca-skins' ) ) {		if ( skin === 'oasis' || skin === 'wikia' ) {			$( 'MB' ).appendTo( '#AccountNavigation' ); $( 'WM' ).appendTo( '#AccountNavigation' );		} else {			$( 'Oasis' ).appendTo( '#p-cactions > .pBody > ul' ); $( 'Mobile</li>' ).appendTo( '#p-cactions > .pBody > ul' );		} 	} } );

//Make gadgets universal //All following functions import Gadgets that I use from Wookieepedia's MediaWiki namespace

////Ajax Undo importScriptPage( 'AjaxUndo/code.js', 'dev' );

////Contribs Range //Loading pages at the whims of Wikipedia is a bad idea. Commenting out until I set up a local copy. //importScriptURI('http://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-contribsrange.js&action=raw&ctype=text/javascript');

////Edit Intro Button var EditIntroButtonText = 'Edit intro'; importScriptPage( 'EditIntroButton/code.js', 'dev' );

////Fast Old Image Revision Delete function fdImageCheckdelete { if( wgCanonicalNamespace === 'File' && wgAction === 'delete' ) { if( window.location.href.match( /&oldimage=/ ) ) { $( '#mw-filedelete-submit' ).click; }	} } $( fdImageCheckdelete );

////Purge Button //var PurgeButtonText = 'New Purge'; //importScriptPage('PurgeButton/code.js', 'dev');

////Fast Delete Buttons (fewer than the ones in the Wookieepedia Gadgets) importScriptPage('FastDelete/code.js', 'dev'); var fdButtons = []; fdButtons[fdButtons.length] = { 'summary': '1.4 Unused image', 'label': 'uu'}; fdButtons[fdButtons.length] = { 'summary': '3.5 Unnecessary redirect', 'label': 'UR'};

//Grunny's hybrid purge button var PurgeButtonText = 'Purge'; importScriptPage('User:Grunny/pb-test.js', 'starwars');

//InactiveUsers edited for main namespace only importScriptPage('MediaWiki:Gadget-inactiveusers.js', 'starwars');

//Batch delete importScriptPage('AjaxBatchDelete/code.js', 'dev');

//