User:DarkBotbarian/global.js

/* chat hacks */ importScriptPage('User:Monchoman45/ChatHacks.js', 'c');

/* Fast Delete */ window.fdButtons = []; window.fdButtons.push(   {        summary: 'Nicht mehr benötigt',        label: 'NmB'    },    {        summary: 'Kein erkennbarer Mehrwert',        label: 'KeM'    },    {        summary: 'Vandalismus',        label: 'V'    },    {        summary: 'Spam',        label: 'S'    } );

/* Importierte Codes */ importArticles({   type: 'script',    articles: [        'u:dev:AjaxRename/code.js',        'u:dev:AjaxTemplate/code.js',        'u:dev:FastDelete/code.js',        'u:dev:LastEdited/code.js',        'u:dev:RedirectManagement/code.js'    ] });

/*Mehrfaches Verschieben */ massRenameDelay = 1000; massRenameSummary = 'automatic'; importScriptPage('MassRename/code.js', 'dev');

/*Mehrfaches Kategorisieren */ massCategorizationDelay = 1000; importScriptPage('MediaWiki:MassCategorization.js', 'de.rain');

/*Mehrfaches Weiterleiten */ massRedirectDelay = 1000; importScriptPage('MassRedirect/code.1.js', 'dev');

/*Mehrfaches Schützen */ massProtectDelay = 1000; importScriptPage('MassProtect/code.js', 'dev');

// From http://dev.wikia.com/wiki/QuickCreateUserPage (modified by AmonFatalis) ( function( $, mw, window ) {	'use strict';	var QuickCreateUserPage = {		init: function {			var $qcLink = $( ' ' ).attr( 'id', 'quick-cup' ).html( $( '' ).attr( 'title', QuickCreateUserPage.langMsg( 'button-tooltip', true ) ) .attr( 'style', 'cursor: pointer' ).text( QuickCreateUserPage.langMsg( 'button-link-text', true ) ) .click( QuickCreateUserPage.createUserPage ) );			if ( mw.config.get( 'skin' ) === 'oasis' ) {				$( '#AccountNavigation' ).find( 'li > ul.subnav' ).prepend( $qcLink );			} else {				$( '#column-one' ).find( '#p-personal > .pBody > ul' ).prepend( $qcLink );			}		},		langConfig: {			//Lang			en: {				'button-link-text': 'User page',				'button-tooltip': 'User page',				'buttontalk-link-text': 'Create user talk page',				'buttontalk-tooltip': 'Create your user talk page',				'cup-reason': 'Creating user page',				'cup-success-text': 'Successfully created page!',				'cup-error-exists': 'Page already exists!',				'cup-error-failed': 'Creating page failed!'			}		},		langMsg: function ( name, userLang ) {			if ( userLang && mw.config.get( 'wgUserLanguage' ) in QuickCreateUserPage.langConfig && name in QuickCreateUserPage.langConfig[mw.config.get( 'wgUserLanguage' )] ) {				return QuickCreateUserPage.langConfig[mw.config.get( 'wgUserLanguage' )][name]; }			if ( !userLang && mw.config.get( 'wgContentLanguage' ) in QuickCreateUserPage.langConfig && name in QuickCreateUserPage.langConfig[mw.config.get( 'wgContentLanguage' )] ) { return QuickCreateUserPage.langConfig[mw.config.get( 'wgContentLanguage' )][name]; }			return QuickCreateUserPage.langConfig.en[name]; },		createUserPage: function { var	userPageContent = window.qtUserPageTemplate || '', pageName = 'User:' + mw.config.get( 'wgUserName' ), overwriteUserPage = window.qtEnableUserPageOverwrite || true; if ( overwriteUserPage === true ) { QuickCreateUserPage.makeEdit( pageName, userPageContent ); return; }			$.getJSON( mw.util.wikiScript( 'api' ), {				action: 'query',				prop: 'revisions',				titles: pageName,				format: 'json'			} ).done( function ( data ) {				var	pageIds = Object.keys( data.query.pages ),					pageId = pageIds[0];				if ( pageId !== '-1' ) {					QuickCreateUserPage.showResult( 'ok', 'cup-error-exists' );				} else {					QuickCreateUserPage.makeEdit( pageName, userPageContent );				}			} ); },		makeEdit: function( pageName, pageContent ) { $.ajax( {				type: 'POST',				url: mw.util.wikiScript( 'api' ),				dataType: 'json',				data: {					action: 'edit',					title: pageName,					summary: QuickCreateUserPage.langMsg( 'cup-reason', false ),					text: pageContent,					format: 'json',					token: mw.user.tokens.get( 'editToken' )				}			} ).done( function ( data ) {				if ( data.edit.result === 'Success' ) {					QuickCreateUserPage.showResult( 'ok', 'cup-success-text' );				} else {					QuickCreateUserPage.showResult( 'error', 'cup-error-failed' );				}			} ).fail( function ( data ) {				QuickCreateUserPage.showResult( 'error', 'cup-error-failed' );			} ); },		showResult: function( result, message ) { if ( mw.config.get( 'skin' ) === 'monobook' ) { mw.util.$content.prepend(					'  ' + QuickCreateUserPage.langMsg( message, true ) + ' ' +					' '				); } else { var resultClass = ( result === 'error' ? 'error' : 'confirm' ); window.GlobalNotification.show( QuickCreateUserPage.langMsg( message, true ), resultClass ); }		}	};	$( QuickCreateUserPage.init ); }( jQuery, mediaWiki, this ) ); // From http://dev.wikia.com/wiki/QuickCreateUserPage (modified by AmonFatalis) ( function( $, mw, window ) { 'use strict'; var QuickCreateUserPage = { init: function { var $qcLink = $( ' ' ).attr( 'id', 'quick-cup' ).html( $( '' ).attr( 'title', QuickCreateUserPage.langMsg( 'button-tooltip', true ) )				.attr( 'style', 'cursor: pointer' ).text( QuickCreateUserPage.langMsg( 'button-link-text', true ) )				.click( QuickCreateUserPage.createUserPage ) ); if ( mw.config.get( 'skin' ) === 'oasis' ) { $( '#AccountNavigation' ).find( 'li > ul.subnav' ).prepend( $qcLink ); } else { $( '#column-one' ).find( '#p-personal > .pBody > ul' ).prepend( $qcLink ); }		},		langConfig: { //Lang en: { 'button-link-text': 'Benutzerseite', 'button-tooltip': 'Benutzerseite', 'buttontalk-link-text': 'Create user talk page', 'buttontalk-tooltip': 'Create your user talk page', 'cup-reason': 'Erstellen der Benutzerseite', 'cup-success-text': 'Benutzerseite erfolgreich erstellt!', 'cup-error-exists': 'Benutzerseite existiert bereits!', 'cup-error-failed': 'Benutzerseite konnte nicht erstellt werden!' }		},		langMsg: function ( name, userLang ) { if ( userLang && mw.config.get( 'wgUserLanguage' ) in QuickCreateUserPage.langConfig && name in QuickCreateUserPage.langConfig[mw.config.get( 'wgUserLanguage' )] ) { return QuickCreateUserPage.langConfig[mw.config.get( 'wgUserLanguage' )][name]; }			if ( !userLang && mw.config.get( 'wgContentLanguage' ) in QuickCreateUserPage.langConfig && name in QuickCreateUserPage.langConfig[mw.config.get( 'wgContentLanguage' )] ) { return QuickCreateUserPage.langConfig[mw.config.get( 'wgContentLanguage' )][name]; }			return QuickCreateUserPage.langConfig.en[name]; },		createUserPage: function { var	userPageContent = window.qtUserPageTemplate || '', pageName = 'User:' + mw.config.get( 'wgUserName' ), overwriteUserPage = window.qtEnableUserPageOverwrite || true; if ( overwriteUserPage === true ) { QuickCreateUserPage.makeEdit( pageName, userPageContent ); return; }			$.getJSON( mw.util.wikiScript( 'api' ), {				action: 'query',				prop: 'revisions',				titles: pageName,				format: 'json'			} ).done( function ( data ) {				var	pageIds = Object.keys( data.query.pages ),					pageId = pageIds[0];				if ( pageId !== '-1' ) {					QuickCreateUserPage.showResult( 'ok', 'cup-error-exists' );				} else {					QuickCreateUserPage.makeEdit( pageName, userPageContent );				}			} ); },		makeEdit: function( pageName, pageContent ) { $.ajax( {				type: 'POST',				url: mw.util.wikiScript( 'api' ),				dataType: 'json',				data: {					action: 'edit',					title: pageName,					summary: QuickCreateUserPage.langMsg( 'cup-reason', false ),					text: pageContent,					format: 'json',					token: mw.user.tokens.get( 'editToken' )				}			} ).done( function ( data ) {				if ( data.edit.result === 'Success' ) {					QuickCreateUserPage.showResult( 'ok', 'cup-success-text' );				} else {					QuickCreateUserPage.showResult( 'error', 'cup-error-failed' );				}			} ).fail( function ( data ) {				QuickCreateUserPage.showResult( 'error', 'cup-error-failed' );			} ); },		showResult: function( result, message ) { if ( mw.config.get( 'skin' ) === 'monobook' ) { mw.util.$content.prepend(					'  ' + QuickCreateUserPage.langMsg( message, true ) + ' ' +					' '				); } else { var resultClass = ( result === 'error' ? 'error' : 'confirm' ); window.GlobalNotification.show( QuickCreateUserPage.langMsg( message, true ), resultClass ); }		}	};	$( QuickCreateUserPage.init ); }( jQuery, mediaWiki, this ) );