User:Nanaki/global.js

/* "Create user page" content override */ qtUserPageTemplate = '';

PurgeButtonText = 'Odśwież';

ThreadInspection = { reviewAll: "Przejrzyj wszystkie wiadomości", reviewTitle: "Kliknij, aby zobaczyć tę wiadomość", quickLinks: { viewText: "z", viewTitle: "Zobacz", editText: "e", editTitle: "Edytuj", deleteText: "u", deleteTitle: "Usuń", } }; nullEditDelay = 1000;

importArticles({   type: "script",    articles: [      "u:dev:WHAM/code.2.js",      "u:dev:RevealAnonIP/usercode.js",      "u:dev:RelatedDiscussionsModule/code.js",      "u:dev:PersistentParameters/code.js",      "u:dev:Thread Inspection/code.js",      "u:dev:LuaError/code.js",      'u:dev:PortableCSSPad/code.js',      'u:dev:AjaxRC.js',      'u:dev:MassNullEdit/code.js',      'u:dev:MassRenameRevert/code.js',      'u:dev:DiscussionsFeed.js',      "u:dev:AjaxBatchDelete/code.2.js",      "u:dev:MultiUpload/code.js"    ] });

importScriptURI('http://internal.vstf.wikia.com/index.php?title=User:Kopcap94/FileTools.js&action=raw&ctype=text/javascript'); importScriptURI('http://internal.vstf.wikia.com/index.php?title=User:Kopcap94/NFRT.js&action=raw&ctype=text/javascript');

/* New nav changes */ $(function {   /* RC in Explore menu */    var pph_wa = $('a[data-tracking="explore-activity"]').parent;    pph_wa.clone.insertBefore(pph_wa).find('>a').attr('href', '/wiki/Special:RecentChanges').attr('data-tracking', 'explore-recentchanges').text('Ostatnie zmiany');    /* Icon link to RC instead of WA */    $('.wds-community-header__wiki-buttons a[data-tracking="wiki-activity"]').attr({href: '/wiki/Special:RecentChanges', title: 'Ostatnie zmiany', 'data-tracking': 'recent-changes'});    /* Swap RC in menu for WA */    $('.wds-community-header__wiki-buttons a[data-tracking="more-recent-changes"]').attr({href: '/wiki/Special:WikiActivity', 'data-tracking': 'more-wiki-activity'}).text('Aktywność na wiki');    /* MultiUpload */    var pph_up = $('a[data-tracking="more-add-new-image"]').parent;    pph_up.clone.insertAfter(pph_up).find('>a').attr('href', '/wiki/Special:MultipleUpload').attr('data-tracking', 'more-add-multiple-images').text('Dodaj wiele obrazów'); });

/* Makes the Lua console auto scroll to bottom on textarea focus */ $(function {   setTimeout(function { $('#mw-scribunto-input').focus(function {           $('#mw-scribunto-output').scrollTop($('#mw-scribunto-output')[0].scrollHeight);        }); }, 5000); });

/* Fix for submit on 'Enter' in Special:CreatePage/Special:CreateBlogPage title input */ $('.mw-special-CreatePage input[name=wpTitle], .mw-special-CreateBlogPage input[name=wpTitle]').keydown(function(e){   if (e.keyCode == 13) {        $('#ok').click;        e.preventDefault;    } });

/* Link to my and bot's contribs */ $('.wds-global-navigation__user-menu li:has(a[data-tracking-label="account.message-wall"])').clone.insertAfter('.wds-global-navigation__user-menu li:has(a[data-tracking-label="account.message-wall"])').find('>a').attr('data-tracking-label','account.contributions').attr('href', '/wiki/Special:Contributions/Nanaki.bot').text('Mój bot'); $('.wds-global-navigation__user-menu li:has(a[data-tracking-label="account.message-wall"])').clone.insertAfter('.wds-global-navigation__user-menu li:has(a[data-tracking-label="account.message-wall"])').find('>a').attr('data-tracking-label','account.botcontributions').attr('href', '/wiki/Special:Contributions/Nanaki').text('Mój wkład');

/* Bypass Special:InfoboxBuilder */ if($('.template-classification-type-text').data('type') == 'infobox') $('#ca-edit').attr('href', function(a) { return this.href + '&useeditor=source'; })

/* Special:Insights won't lead directly to editor */ $('.insights-list-item-title').attr('href', function { return this.href.replace(/([\?&])action=edit&/, '$1') })

/* Cat redlinks */ $('#catlinks .newcategory, #WikiaArticle .newcategory').addClass('new');

/* Remove "Author profile" */ $('.wds-global-navigation__user-menu li:has(a[data-tracking-label="account.profile-author"])').remove;

/* PPH changes */ $('.pph-languages a[data-tracking="interwiki-'+wgContentLanguage+'"]').parent.remove $('.pph-languages ul').first.prepend(   $('.pph-languages a[data-tracking="interwiki-pl"]').parent,    $('.pph-languages a[data-tracking="interwiki-en"]').parent ); $('.page-header__languages [data-tracking=top-en]').parent.prependTo('.page-header__languages .wds-list').css('font-weight', 'bold'); $('.page-header__languages [data-tracking=top-pl]').parent.prependTo('.page-header__languages .wds-list').css('font-weight', 'bold');

/* LastEdited config */ window.lastEdited = { avatar: false, size: false, diff: false, comment: false, time: 'timeago', timezone: 'local', position: { element: document.getElementById('WikiaMainContent'), method: 'append' }, };