User:Bot Kostki/global.js

// ChatHacks importScriptPage('User:Monchoman45/ChatHacks.js', 'c'); var grUserPageText = ''; // Linki u góry $( function {	if ( !document.getElementById( 'ca-skins' ) ) {		$( 'MB ' ).appendTo( '#GlobalNavigation' );	} } ); $( function {	if ( !document.getElementById( 'cs' ) ) {		$( ' CS' ).appendTo( '#GlobalNavigation' );	} } ); $( function {	if ( !document.getElementById( 'cw' ) ) {		$( ' CW' ).appendTo( '#GlobalNavigation' );	} } ); // PortableCSSPad importArticles({   type: 'script',    articles: [        'u:dev:PortableCSSPad/code.js'    ] }); // MiniComplete importArticles( {   type: 'script',    articles: [        // ...        'u:dev:MiniComplete/code.js',        // ...    ] } ); // Ajax importArticles( {   type: 'script',    articles: [	'u:dev:AjaxPatrol/code.js',	'u:dev:AjaxUndo/code.js',	'u:dev:AjaxTemplate/code.js' ] } ); // WHAM importScriptPage('User:Pan_Cube/polish_WHAM.js', 'c'); // HideRail importScriptPage('HideRail/code.js', 'dev'); // IP zamiast użytkownik wikii window.RevealAnonIP = { permissions: ['user'] }; // AjaxBatchDelete /* * Ajax batch delete thingy, version [0.0.3] by Grunny * Based on: http://en.wikipedia.org/wiki/User:Splarka/ajaxbatchdelete.js * Converted to use jQuery */ $( function {	if( skin === 'monobook' ) {		addPortletLink( 'p-tb', wgServer + wgScriptPath + '/index.php?title=Special:BlankPage&blankspecial=ajaxjqbd', 'Masowe usuwanie');	} else {		$( '#my-tools-menu' ).prepend( ' Masowe usuwanie' );	} } ); if( wgCanonicalSpecialPageName === 'Blankpage' && $.getUrlVar( 'blankspecial' ) === 'ajaxjqbd' ) { document.title = 'Ajax Batch Delete'; $( createAjaxDeleteForm ); } function createAjaxDeleteForm { var	pageHeading = ( skin === 'oasis' ) ? ( $( '.AdminDashboardArticleHeader' ).length ? '.AdminDashboardArticleHeader > h1' : '.WikiaPageHeader > h1' ) : 'h1.firstHeading', $bodyId = $( '#mw-content-text > p' ), bdelFormHtml = '' + ' Powód usunięcia: ' + '   '; $( pageHeading ).text( 'Ajax Batch Delete' ); $bodyId.text( 'Lista stron do usunięcia:' ); $bodyId.after( bdelFormHtml ); } function ajaxDeleteStart { document.getElementById( 'abd-startbutton' ).setAttribute( 'disabled', 'disabled' ); var	txt = document.getElementById( 'abd-textarea' ), deletes = txt.value.split( '\n' ), page = deletes[0], reason = document.getElementById( 'abd-reason' ).value, badchars = /(\#|\<|\>|\[|\]|\{|\}|\|)/; if( page === '' ) { $( '#abd-output' ).append( '* Zrobione! Całość usunięta lub następna linia jest pusta.\n' ); document.getElementById( 'abd-startbutton' ).removeAttribute( 'disabled'); } else { if( badchars.test( page ) ) { $( '#abd-output' ).append( '! Wykryto niedozwolone znaki, pominięto:' + page + '\n' ); setTimeout( ajaxDeleteStart, 1000 ); } else { $( '#abd-output' ).append( '> Próba usunięcia ' + page + '\n' ); ajaxBatchDeleteAPage( page, reason ); }	}	deletes = deletes.slice(1,deletes.length); txt.value = deletes.join( '\n' ); } function ajaxBatchDeleteAPage( title, deleteReason ) { var url = wgServer + wgScriptPath + '/api.php?action=query&prop=info&intoken=delete&titles=' + encodeURIComponent( title ) + '&format=json'; $.getJSON( url, function( data ) {		for ( var p in data.query.pages ) {			break;		}		var	ET = data.query.pages[p].deletetoken,			url = wgServer + wgScriptPath + '/api.php?action=delete&title=' + encodeURIComponent( title ) + '&reason=' + encodeURIComponent( deleteReason ) + '&format=json&token=' + encodeURIComponent( ET );		$.post( url, function { $( '#abd-output' ).append( ' > Deleted\n' ); setTimeout( ajaxDeleteStart, 1000 ); } );	} ); }