User:Paweł Ziemian/common.js

( function ( mw, $ ) {	var LIMIT = 2000;

if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Newpages' ) { $( '.mw-newpages-length' ) .filter( function {				var matcher = this.textContent.match( /^\[([^a-z-A-Z\]]+)/ );				return matcher && parseInt( matcher[1].replace( /[^0-9]/g, '' ) ) >= LIMIT;			} ).each( function  {				this.style.fontWeight = 'bold';			} ); } }( mediaWiki, jQuery ) );

jQuery( document ).ready( function {       var elBefore = document.getElementById( 'pt-logout' );        // Podstrony        var elNew = document.createElement( 'li' );        elNew.innerHTML = 'Podstrony';        elBefore.parentNode.insertBefore( elNew, elBefore );        // LUA        var elNew2 = document.createElement( 'li' );        elNew2.innerHTML = 'LUA';        elBefore.parentNode.insertBefore( elNew2, elBefore ); } );

$(document).ready(function {	if (/^(mnie|mną|sobą)$/i.test("MNĄ")) {		console.log("działa "+mw.config.get('wgUserLanguage'))	} });

importScript("User:Paweł Ziemian/pct.js");

$(document).ready(function{	var items = $('.reflist[style*="lower-alpha"] .mw-cite-backlink a:not(:only-of-type) > sup > i > b');	if (items.length) {		var pattern = /^[a-z]+$/;		var baseA = "a".charCodeAt(0);		var baseZ = "z".charCodeAt(0);		var base = baseZ - baseA + 1;		var cache = new Map;		cache.set("a", "1");		cache.set("b", "2");		cache.set("c", "3");		cache.set("d", "4");		cache.set("e", "5");		items.each(function(index, item){ var value = $(item).html; if (pattern.test(value)) { if (!cache.has(value)) { var result = 0; for(var i = 0; i < value.length; i++) { var digit = value.charCodeAt(i) - baseA; result = result * base + digit; }					cache.set(value, (result + 1).toString); }				$(item).html(cache.get(value)); }		});	} });