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: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:ViewRemoved/code.js',        'u:dev:UserCheck/code.js',        'u:dev:SearchSuggest/code.js',        'u:dev:WhatLinksHere/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 $(function {    // Author: Nanaki    $('.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');    // Author: DuckeyD    $('.wds-community-header__wiki-buttons a[data-tracking="more-all-shortcuts"]').parent.remove;    // Author: Luqgreg (heavily modified by DuckeyD)    $('.wds-community-header__wiki-buttons .wds-list').append([ $('', { 'class': 'wds-dropdown-level-2 wds-is-sticked-to-parent' }).append([           $('', { 'class': 'wds-dropdown-level-2__toggle' }).append([ $(' ').text('VAN'), $(' ') ]),           $(' ', { 'class': 'wds-is-not-scrollable wds-dropdown-level-2__content' }).append( $('', { 'class': 'wds-list wds-is-linked' }).append([                   $('').append($('', { 'href': '/wiki/Special:Insights/nonportableinfoboxes' }).text('S:I/NPI')),                    $('').append($('', { 'href': '/wiki/Special:Insights/templateswithouttype' }).text('S:I/UT')),                    $('').append($('', { 'href': '/wiki/Special:Log?type=templateclassification&user=&page=&year=&month=-1' }).text('S:L/TC')),                    $('').append($('', { 'href': '/wiki/Special:AllInfoboxes' }).text('S:AI')),                    $('').append($('', { 'href': '/wiki/Special:Templates' }).text('S:T'))                ]) )       ]),        $('', { 'class': 'wds-dropdown-level-2 wds-is-sticked-to-parent' }).append([            $('<a>', { 'class': 'wds-dropdown-level-2__toggle', 'href': '/wiki/Special:Search?search=.css&ns8=1' }).append([ $(' ').text('MW/*.css'), $('<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" class="wds-icon wds-icon-tiny wds-dropdown-chevron" id="wds-icons-menu-control-tiny"><path d="M6.003 10.002a.997.997 0 0 1-.707-.293L.293 4.707a.999.999 0 1 1 1.414-1.414l4.296 4.295 4.293-4.293A.999.999 0 1 1 11.71 4.71l-5 5a.997.997 0 0 1-.707.293" fill-rule="evenodd"> ') ]),           $(' ', { 'class': 'wds-is-not-scrollable wds-dropdown-level-2__content' }).append( $('<ul>', { 'class': 'wds-list wds-is-linked' }).append([                   $('<li>').append($('<a>', { 'href': '/wiki/MediaWiki:Wikia.css' }).text('Wikia.css')),                    $('<li>').append($('<a>', { 'href': '/wiki/MediaWiki:Common.css' }).text('Common.css')),                    $('<li>').append($('<a>', { 'href': '/wiki/MediaWiki:Themes.css' }).text('Themes.css'))                ]) )       ]),        $('<li>', { 'class': 'wds-dropdown-level-2 wds-is-sticked-to-parent' }).append([            $('<a>', { 'class': 'wds-dropdown-level-2__toggle', 'href': '/wiki/Special:Search?search=.js&ns8=1' }).append([ $(' ').text('MW/*.js'), $('<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" class="wds-icon wds-icon-tiny wds-dropdown-chevron" id="wds-icons-menu-control-tiny"><path d="M6.003 10.002a.997.997 0 0 1-.707-.293L.293 4.707a.999.999 0 1 1 1.414-1.414l4.296 4.295 4.293-4.293A.999.999 0 1 1 11.71 4.71l-5 5a.997.997 0 0 1-.707.293" fill-rule="evenodd"> ') ]),           $(' ', { 'class': 'wds-is-not-scrollable wds-dropdown-level-2__content' }).append( $('<ul>', { 'class': 'wds-list wds-is-linked' }).append([                   $('<li>').append($('<a>', { 'href': '/wiki/MediaWiki:ImportJS' }).text('ImportJS')),                    $('<li>').append($('<a>', { 'href': '/wiki/MediaWiki:Wikia.js' }).text('Wikia.js')),                    $('<li>').append($('<a>', { 'href': '/wiki/MediaWiki:Common.js' }).text('Common.js'))                ]) )       ]),        $('<li>', { 'class': 'wds-dropdown-level-2 wds-is-sticked-to-parent' }).append([            $('<a>', { 'class': 'wds-dropdown-level-2__toggle' }).append([ $(' ').text('Tools'), $('<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" class="wds-icon wds-icon-tiny wds-dropdown-chevron" id="wds-icons-menu-control-tiny"><path d="M6.003 10.002a.997.997 0 0 1-.707-.293L.293 4.707a.999.999 0 1 1 1.414-1.414l4.296 4.295 4.293-4.293A.999.999 0 1 1 11.71 4.71l-5 5a.997.997 0 0 1-.707.293" fill-rule="evenodd"> ') ]),           $(' ', { 'class': 'wds-is-not-scrollable wds-dropdown-level-2__content' }).append( $('<ul>', { 'class': 'wds-list wds-is-linked' }).append([                   $('<li>').append($('<a>', { 'href': '/wiki/Special:BlankPage?blankspecial=MultiUpload' }).text('MultiUpload'))                ]) )       ])    ]); });

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