User:Szynka013/global.js

// Imports importScriptPage('PortableCSSPad/code.js', 'dev');            // PortableCSSPad importScriptPage('WHAM/pl/code.2.js', 'dev');                 // WHAM! importScriptPage('User:Wedkarski/chatpack.js', 'wed');        // ChatPack importScriptPage('User:Joeytje50/ChatPMs.js', 'c');           // MultiPriv importScriptPage('User:PlasmaTime/quickBlock.js','c');        // QuickBlock importScriptPage('MassRenameRevert/code.js', 'dev');          // MassRenameRevert importScriptPage('Wikia Essentials/code.js', 'dev');          // Wikia_Essentials importScriptPage('NullEditButton/code.js', 'dev');            // NullEditButton importScriptPage("FileUsageAuto-update/code.js", "dev");      // FileUsageAuto-update importScriptPage("QuickContribs/code.js", "dev");             // QuickContribs

// LastEdit importArticles( {   type: 'script',    articles: [        'u:dev:LastEdited/code.js',    ] } ); window.lastEdited = { avatar: true, position: 'top', size: true, diff: true, comment: true, lang: 'pl', time: true };

// AjaxRC window.ajaxPages = ["Special:RecentChanges","Specjalna:Ostatnie_zmiany"]; window.AjaxRCRefreshText = 'Automatyczne odświeżanie'; window.AjaxRCRefreshHoverText = 'Włącza automatyczne odświeżanie strony'; importScriptPage('AjaxRC/code.js', 'dev');

// ChangeSkins window.monoBookText = "Monobook"; window.oasisText = "Oasis"; window.venusText = "Venus"; window.mobileText = "Mobile"; importScriptPage('SkinSwitchButton/code.js', 'dev');

// LICENSES FILE function emptyLicenseAlert(form) { var msg = "Licencja pliku nie została wybrana. Możesz spróbować ponownie, ale pamiętaj, że pliki bez licencji są usuwane." if(window.emptyLicenseWarningDelivered) return true; if($('#wpLicense').val == '') { alert(msg); window.emptyLicenseWarningDelivered = true return false }	return true; } $('#mw-upload-form').submit(function(e) {return emptyLicenseAlert(this);}); $(".wikia-gallery-item .thumbimage").each(function(i,elem) {		$(elem).attr('title',$(elem).attr('alt'));	}); $(".wikia-gallery-item .image").each(function(i,elem) {		$(elem).attr('title',$(elem).attr('alt')); });

// DODATKOWE PRZYCISKI W EDYTORZE ŹRÓDŁA by Wedkarski 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": "http://static.wikia.com/central/images/f/fd/Button_blockquote.png", "speedTip": "Wstaw szablon profilu", "tagOpen": "", "tagClose": "", "sampleText": "" };	mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://static.wikia.com/central/images/c/c8/Button_comment_round.png", "speedTip": "Wstaw szablon nagłówka", "tagOpen": "", "tagClose": "", "sampleText": "" }; }

// DODATKOWE KOMENDY DO CZATU // Usunać po premierze mega paczki od Wedkarskiego // Helperzy $('[name="message"]').keypress(function(e) { if (e.which == 32||e.which == 13) { this.value = this.value.replace('/helperzy', 'Nanaki (tablica) • Vuh (tablica) • Baakamono (tablica) • Pio387 (tablica) • Wedkarski (tablica) • Matik7 (tablica)'); } }) // Utile $('[name="message"]').keypress(function(e) { if (e.which == 32||e.which == 13) { this.value = this.value.replace('/utile', 'Nanaki (tablica) • Vuh (tablica) • Baakamono (tablica)'); } }) // VSTF-y $('[name="message"]').keypress(function(e) { if (e.which == 32||e.which == 13) { this.value = this.value.replace('/vstfy', 'Wedkarski (tablica) • Pio387 (tablica)'); } }) /* // Helperzy $('[name="message"]').keypress(function(e) { if (e.which == 32||e.which == 13) { this.value = this.value.replace('/helperzy', 'Nanaki (tablica) • Vuh (tablica) • Baakamono (tablica) • Pio387 (tablica) • Wedkarski (tablica) • Matik7 (tablica)'); } }) // Utile $('[name="message"]').keypress(function(e) { if (e.which == 32||e.which == 13) { this.value = this.value.replace('/utile', 'Nanaki (tablica) • Vuh (tablica) • Baakamono (tablica)'); } }) // VSTF-y $('[name="message"]').keypress(function(e) { if (e.which == 32||e.which == 13) { this.value = this.value.replace('/vstfy', 'Wedkarski (tablica) • Pio387 (tablica)'); } })

// TESTY /* //When looking at a user profile page, if ($("#UserProfileMasthead").size) {

//get the displayed editcount, editCount = $("#UserProfileMasthead .tally em").html.replace(",","");

//compare it to a predefined list of levels, editRanks = { 1:"Nowicjusz", 10:"Początkujący", 50:"Lepszy", 100:"Średni", 100000:"Zaawansowany", } for(i in editRanks) if (editCount >= parseInt(i)) editRank = editRanks[i];

//and display the corresponding level as a tag. if (editCount) $("#UserProfileMasthead hgroup").append(     $(" ").addClass("tag").html(editRank)    );

}