User:Michał56/global.js

//imports importScriptPage('User:Wedkarski/chatpack.js', 'wedkarski'); importScriptPage('MediaWiki:Interwiki.js', 'community'); importScriptPage('User:Michał56/HotCat.js', 'nonsensopedia'); importScriptPage('PortableCSSPad/code.js', 'dev'); importScriptPage('User:Michał56/wham.js', 'nonsensopedia'); importArticles({ type: 'script', articles: [    'u:dev:Standard_Edit_Summary/code.js' ]}); window.dev = window.dev || {}; window.dev.editSummaries = { select: [ '(click to browse)', '1.Refactoring', [ 'Cleanup', 'Vandalism', 'Spam' ]   ] }; // if (typeof (mwCustomEditButtons) != 'undefined') { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/commons/2/26/Button_latinas.png", "speedTip": "Wstaw polskie cudzysłowy", "tagOpen": "„", "tagClose": "”", "sampleText": "" };	mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "https://upload.wikimedia.org/wikipedia/commons/3/3f/Button_headline_-_2.png", "speedTip": "Wstaw półpauzę", "tagOpen": "–", "tagClose": "", "sampleText": "" };	mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/inciclopedia/images/4/43/Enlace_a_usuario.png", "speedTip": "Wstaw szablon profilu", "tagOpen": "", "sampleText": "" }; } //fast delete buttons window.fdButtons = []; window.fdButtons.push(   {        summary: 'Bo tak',        label: 'Bo tak'    },    {        summary: 'Wandalizm',        label: 'Wandalizm'    },    {        summary: 'Prywata',        label: 'Prywata'    } ); importArticles( {   type: 'script',    articles: [        // ...        'u:dev:FastDelete/code.js',        // ...    ] } );

//MassBlock massBlockDelay = 1000; importScriptPage('MassBlock/code.js', 'dev');

//massCategorization massCategorizationDelay = 1000; importScriptPage('MassCategorization/code.js', 'dev');

//massProtect massProtectDelay = 1000; importScriptPage('MassProtect/code.js', 'dev');

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

//massUserRight massUserRightsDelay = 1000; importScriptPage('MassUserRights/code.js', 'dev');

//MassRenameRevert importScriptPage('MassRenameRevert/code.js', 'dev');

//AjaxBatchDelete (mass delete) batchDeleteDelay = 1000; importScriptPage('AjaxBatchDelete/code.2.js', 'dev');

//AnchoredRollback anchoredRollbackBot = true; importScriptPage('AnchoredRollback/code.js', 'dev');

//AjaxPatrol importScriptPage('AjaxPatrol/code.js', 'dev' );

//ChatAnnouncements chatAnnouncementsAll = true; importScriptPage('ChatAnnouncements/code.js','dev');

//AjaxUndo

jQuery(document).ready( function ( $ ) {	"use strict";	function createUndoLink( diffUndoUrl ) {		var $ajaxUndoLink = $( '' ).text( 'AJAX Undo' ).attr( 'href', '#' ).click( function { var	$ajaxUndoLinkob = $( this ), undoIdRegex = /&undo=([^&]*)/, undoId = undoIdRegex.exec( diffUndoUrl )[1], editToken, etUrl = wgServer + wgScriptPath + '/api.php?action=query&prop=info|revisions&intoken=edit&titles=' + encodeURIComponent( wgPageName ) + '&format=json'; $ajaxUndoLinkob.html( ' ' ); $.getJSON( etUrl, function ( data ) {				editToken = data.query.pages[wgArticleId].edittoken;				$.ajax( { url: wgScriptPath + '/api.php?', data: 'action=edit&format=json&title=' + encodeURIComponent( wgPageName ) + '&undo=' + encodeURIComponent( undoId ) + '&bot=1&token=' + encodeURIComponent( editToken ), dataType: 'json', type: 'POST', success: function ( data ) { if ( data.edit && data.edit.result === 'Success' ) { $ajaxUndoLinkob.text( '(undone)' ); } else if ( data.error && data.error.code === 'undofailure' ) { $ajaxUndoLinkob.text( '(error)' ); alert( data.error.info ); } else { $ajaxUndoLinkob.text( '(error)' ); alert( 'Error: Unknown result from API.' ); }					},					error: function { $ajaxUndoLinkob.text( '(error)' ); }				} );			} );		} );		return $ajaxUndoLink;	}	if ( $( '.mw-history-undo > a' ).length && wgAction === 'history' ) {		$( '.mw-history-undo > a' ).each( function { var	diffUndoUrl = $( this ).attr( 'href' ), $ajaxUndoLink = createUndoLink( diffUndoUrl ); $( this ).parent.after( ' | ', $ajaxUndoLink ); } );	} else if ( $( 'table.diff' ).length && typeof $.getUrlVar( 'diff' ) !== 'undefined' ) {		var	$diffUndoLink = $( 'table.diff' ).find( '.diff-ntitle > #mw-diff-ntitle1 a:last' ),			diffUndoUrl = $diffUndoLink.attr( 'href' ),			$ajaxDiffUndoLink = createUndoLink( diffUndoUrl );		$diffUndoLink.parent.append( ' (', $ajaxDiffUndoLink, ')' );	} } );

//Link do wkładu if ($('a[data-id="Wkład"]').length) return; $('#AccountNavigation > li > .subnav > li:first').after(		$('').append('Mój wkład')	); }) (this.jQuery, this.mediaWiki);
 * (function($, mw) {

//Link do profilu if ($('a[data-id="Profil"]').length) return; $('#AccountNavigation > li > .subnav > li:first').after(		$('').append('Mój profil')	); }) (this.jQuery, this.mediaWiki);
 * (function($, mw) {