User:Psl631/common.js

/** * Add "Purge" content action link. * * Dependencies: mediawiki.util * * @source www.mediawiki.org/wiki/Snippets/Purge_action * @revision 2014-05-14 */ $( function {    if ( !$( '#ca-purge' ).length && mw.config.get( 'wgIsArticle' ) ) {        mw.util.addPortletLink( 'p-cactions', mw.util.wikiScript + '?' + $.param({ title: mw.config.get( 'wgPageName' ), action: 'purge' }), mw.config.get( 'skin' ) === 'vector' ? 'Purge' : '*', 'ca-purge', 'Purge the server cache of this page', '*'       );    } } ); mw.loader.load('//www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-UTCLiveClock.js&action=raw&ctype=text/javascript'); mw.loader.load( '//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-HotCat.js&action=raw&ctype=text/javascript' ); mw.loader.load('//meta.miraheze.org/w/index.php?title=User:Void/createWikiNotify.js&action=raw&ctype=text/javascript'); mw.loader.load('//testwiki.wiki/index.php?title=User:MacFan4000/massRevdel.js&action=raw&ctype=text/javascript');

// (mw.loader.getState('ext.gadget.rtrc') ? mw.loader.load('ext.gadget.rtrc') : mw.loader.load('https://www.mediawiki.org/w/load.php?debug=false&modules=ext.gadget.rtrc&lang=' + mw.config.get('wgUserLanguage', 'en'))); /*

Informacja o niewpisaniu opisu zmian

 * Autorzy (Authors): Adam Dziura, Maciej Jaros
 * Wyłączenie (disable): window.NoSummaryWarningDone = true;

window.oSummaryWarning = new Object; oSummaryWarning.version = 1;

oSummaryWarning.init = function {	var that = this;

if (window.NoSummaryWarningDone) { return; }

// Ignore user's own pages if ( mw.config.get('wgCanonicalNamespace') == "User" ) { var m = mw.config.get('wgPageName').match(/^[^:]+:([^\/]+)(?:$|\/)/); if (m && m[1] == mw.config.get('wgUserName')) { return; }	}

jQuery('#wpSave').click(function(event) {		if (!that.validateForm) {			event.preventDefault;		}	}); }

oSummaryWarning.validateForm = function {	var input_el = document.getElementById('wpSummary'); if (!input_el) { return true; }	var summary = input_el.value;

// user has been warned if (input_el.warningSet) { return true; }

// empty or nothing but section comment if (summary == '' || summary.substring(summary.indexOf('*/'))=='*/ ') {		// ignore redirects - there is autosummary var wpTextbox1 = document.getElementById('wpTextbox1'); if (wpTextbox1.value.match(/^#(?:REDIRECT|PRZEKIERUJ|TAM|PATRZ)/i)) { return true; }

// do not check titles of sections on non-talk pages if (mw.config.get('wgNamespaceNumber') % 2 == 0 && input_el.form.wpSection.value == 'new') { return true; }

// set warning, do not submit form input_el.warningSet = true; input_el.className = 'summaryWarning'; document.getElementById('wpSummaryLabel').className = 'summaryWarning'; return false; }	return true; }

jQuery(document).ready(function { oSummaryWarning.init });

// Dołączenie skryptu ze strony: MediaWiki:LiveRC.js if ( mw.config.get( 'wgPageName' ) === "Wikipedia:Narzędzia/LiveRC/podgląd" ) { importScript( 'MediaWiki:LiveRC.js' ); }

// // Link w menu (obok obserwowanych) // mw.loader.using( "mediawiki.util", function {	$( function { mw.util.addPortletLink( 'p-personal', mw.util.getUrl( 'Wikipedia:Narzędzia/LiveRC/podgląd' ), 'LiveRC', 'pt-liverc', null, '', '#pt-watchlist' ); } ); } );