User:Pirr-fduser/global.js

/** * Scripts which should be loaded always */ ajaxPages = [   // AjaxRC "Specjalna:Aktywność_na_wiki", "Specjalna:Ostatnie_zmiany", "Specjalna:Rejestr", "Specjalna:Nowe_pliki", "Specjalna:Nowe_strony" ]; AjaxRCRefreshText = 'Auto-odświeżanie'; AjaxRCRefreshHoverText = 'Automatycznie aktualizuje tę stronę';

window.lastEdited = {   // LastEdited avatar: true, size: true, diff: true, comment: true, lang: 'pl', time: true };

PurgeButtonText = 'Odśwież';   // PurgeButton

var qtUserPageTemplate = '';  // QuickCreateUserPage var qtEnableUserPageOverwrite = true;

window.monoBookText = "Monobook";  // SkinSwitchButton window.oasisText = "Oasis"; window.mobileText = "Mobile";

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:AjaxRC/code.js',                       // AjaxRC        'u:dev:MediaWiki:FindAndReplace/code.js',               // FindAndReplace        'u:dev:MediaWiki:LastEdited/code.js',                   // LastEdited        'u:dev:MediaWiki:NullEditButton/code.js',               // NullEditButton        'u:dev:MediaWiki:PortableCSSPad/code.js',               // PortableCSSPad        'u:dev:MediaWiki:QuickCreateUserPage/code.js',          // QuickCreateUserPage        'u:dev:MediaWiki:SkinSwitchButton/code.js',             // SkinSwitchButton    ] });

// Wiki blacklist for self-protection // Author: Luqgreg var currentWiki = window.location.host; var wikiBlacklist = [ "pl.star-wars.wikia.com", "pl.marvelcinematicuniverse.wikia.com", "pl.spider-manfilmseries.wikia.com", "pl.x-mencinematicuniverse.wikia.com", "pl.theamazingspider-manfilmseries.wikia.com", "pl.fantasticfourfilmseries.wikia.com", "pl.2015fantasticfourmovie.wikia.com", "michalbr10.wikia.com" ]; if(wikiBlacklist.includes(currentWiki)) { window.location.replace("http://community.wikia.com/wiki/Community_Central:Not_a_valid_community"); } // Additional icon that links to Special:Upload // Author: Nanaki $(function {   var activity = $('.wds-community-header__wiki-buttons a[data-tracking="wiki-activity"]');    activity.clone.attr({href: '/wiki/Special:Upload', title: 'Prześlij plik', 'data-tracking': 'upload'}).insertBefore(activity).find('svg').attr('id', '').html('<path d="M 8.984375 0.98632812 A 1.0001 1.0001 0 0 0 8.203125 1.3828125 L 4.2929688 5.2929688 A 1.0001 1.0001 0 1 0 5.7070312 6.7070312 L 8 4.4140625 L 8 12 A 1.0001 1.0001 0 1 0 10 12 L 10 4.4140625 L 12.292969 6.7070312 A 1.0001 1.0001 0 1 0 13.707031 5.2929688 L 9.7910156 1.3769531 A 1.0001 1.0001 0 0 0 8.984375 0.98632812 z M 2.984375 10.986328 A 1.0001 1.0001 0 0 0 2 12 L 2 16 A 1.0001 1.0001 0 0 0 3 17 L 15 17 A 1.0001 1.0001 0 0 0 16 16 L 16 12 A 1.0001 1.0001 0 1 0 14 12 L 14 15 L 4 15 L 4 12 A 1.0001 1.0001 0 0 0 2.984375 10.986328 z "> '); });

/** * Scripts which should be loaded whin I'm in specified group of users */ for (var i in wgUserGroups) { // content-moderator if(wgUserGroups[i] == 'content-moderator') { linkSweepConfirmation = true;   // Linksweeper LinkSweeperDelay = 1000; importArticles({           type: 'script',            articles: [                'u:dev:MediaWiki:AjaxBatchDelete/code.js',              // AjaxBatchDelete                'u:dev:MediaWiki:CategoryRenameAuto-update/code.js',    // CategoryRenameAuto-update                'u:dev:MediaWiki:FileUsageAuto-update/code.js',         // FileUsageAuto-update                'u:dev:Linksweeper/code.js',                            // Linksweeper                'u:dev:MediaWiki:RevealAnonIP/code.js',                 // RevealAnonIP            ]        }); }

// thread-moderator if(wgUserGroups[i] == 'threadmoderator') { importArticles({           type: 'script',            articles: [                'u:dev:MediaWiki:AjaxBatchDelete/code.js',              // AjaxBatchDelete                'u:dev:MediaWiki:RevealAnonIP/code.js',                 // RevealAnonIP                'u:dev:MediaWiki:ViewRemoved/code.js',                  // ViewRemoved            ]        }); }

// admin if(wgUserGroups[i] == 'sysop') { importArticles({           type: 'script',            articles: [                'u:dev:AddUserRightsTag/code.js',                       // AddUserRightsTag                'u:dev:MediaWiki:AjaxBatchDelete/code.js',              // AjaxBatchDelete                'u:dev:MediaWiki:CategoryRenameAuto-update/code.js',    // CategoryRenameAuto-update                'u:dev:MediaWiki:FileUsageAuto-update/code.js',         // FileUsageAuto-update                'u:dev:Linksweeper/code.js',                            // Linksweeper                'u:dev:ListFiles/code.js',                              // ListFiles                'u:dev:MediaWiki:RevealAnonIP/code.js',                 // RevealAnonIP                'u:dev:MediaWiki:ViewRemoved/code.js',                  // ViewRemoved                'u:dev:MediaWiki:WHAM/pl/code.2.js'                     // WHAM            ]        }); }

// bot if(wgUserGroups[i] == 'bot') { linkSweepConfirmation = true;   // Linksweeper LinkSweeperDelay = 1000; importArticles({           type: 'script',            articles: [                'u:dev:MediaWiki:CategoryRenameAuto-update/code.js',    // CategoryRenameAuto-update                'u:dev:MediaWiki:FileUsageAuto-update/code.js',         // FileUsageAuto-update                'u:dev:Linksweeper/code.js',                            // Linksweeper            ]        }); } }