User:Darth Culator/global.js

// 

// ***************************************************************** // Load various external scripts // ***************************************************************** importScriptPage('FastDelete/code.js', 'dev');

// ***************************************************************** // Custom automatic delete buttons // ***************************************************************** // Adds customizable one-click deletion buttons to any deletable page. // Requires w:User:Splarka/fastdelete.js in appendScript; var fdButtons = [];

fdButtons[fdButtons.length] = { 'summary': '1.4 Unused image', 'label': 'uu'};

//Make sure "block email" is always checked and "anon only" is always unchecked by default on block pages addOnloadHook(function{ var x; if (x=document.getElementById('wpEmailBan')) {x.checked=true;} });

addOnloadHook(function{ var x; if (x=document.getElementById('wpAnonOnly')) {x.checked=false;} });

// Skin Switch Button for monobook to oasis and vice versa // and for monobook and oasis to 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 importScriptPage( 'AjaxUndo/code.js', 'dev' ); importScriptURI('http://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-contribsrange.js&action=raw&ctype=text/javascript');

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

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

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

/* Correct URL for German Star Wars wiki in any case not covered by Template:Interlang */ function replace_de {   if ($("li.interwiki-de").children("a") > 0) {       $("li.interwiki-de").children("a").attr("href", $("li.interwiki-de").children("a").attr("href").replace("de.jedipedia.wikia.com", "www.jedipedia.net")) }   else if ($(".WikiaArticleInterlang").find("a:contains('Deutsch')") > 0) {       $(".WikiaArticleInterlang").find("a:contains('Deutsch')").attr("href", $(".WikiaArticleInterlang").find("a:contains('Deutsch')").attr("href").replace("de.jedipedia.wikia.com", "www.jedipedia.net")); } }

addOnloadHook( replace_de );

//