User:DuckeyD/global.js

// LastEdited if (wgNamespaceNumber === 0 || wgNamespaceNumber === 2 || wgNamespaceNumber === 4 || wgNamespaceNumber === 14) { // Article, User, Project, Category window.lastEdited = { avatar: false, position: { element: document.getElementById('WikiaMainContent'), method: 'append' }   }; } else if (wgNamespaceNumber === 500) { // UserBlog } else { // MediaWiki, Module, File... window.lastEdited = { avatar: false }; }

// AjaxRC window.ajaxSpecialPages = [ 'Recentchanges', 'WikiActivity', 'Watchlist', 'Log', 'Newpages' ];

// Import importArticles({   type: 'script',    articles: [        'u:dev:PortableCSSPad/code.js',        'u:dev:AjaxRC/code.js',        'u:dev:MultiUpload/code.js',        'u:dev:NullEditButton/code.js',        'u:dev:PurgeButton/code.js',        'u:dev:LastEdited/code.js',        'u:dev:View Source/code.js',        'u:dev:RevealAnonIP/usercode.js',        'u:dev:LuaError/code.js',        'u:dev:Luapreviewer.js',        'u:dev:ViewRemoved/code.js',        'u:dev:AjaxPatrol/code.js',        'u:dev:UserCheck/code.js',        'u:dev:SearchSuggest/code.js'    ] });

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

// Nav changes // Author: Nanaki $(function {    $('.wds-community-header__wiki-buttons a[data-tracking="wiki-activity"]').attr({href: '/wiki/Special:RecentChanges', title: 'Ostatnie zmiany', 'data-tracking': 'recent-changes'});    $('.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'); });

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