User:Iiii I I I/global.js

// imports OFPoptions = {'showlinks': false}; importArticles({   type: 'script',    articles: [        'u:dev:GlobalEditcount/code.js',        'u:dev:OldFilePages/code.js',        'u:dev:NoImageLightbox/code.js',        'u:dev:QuickDiff/code.js'    ] });

$(function {   var config = mw.config.get([ 'wgTitle', 'wgAction', 'wgPageName', 'wgNamespaceNumber', 'wgFormattedNamespaces' ]),       articlePath = mw.util.wikiGetlink(config.wgPageName);

// modify user dropdown in global navigation (function {       var $contributionsLink = $('').text('My Contributions').attr({ class: 'wds-global-navigation__dropdown-link', href: mw.util.wikiGetlink('Special:MyContributions'), id: 'contributions-link' }),           $followingLink = $('').text('My Followed Pages').attr({ class: 'wds-global-navigation__dropdown-link', href: mw.util.wikiGetlink('Special:Following'), id: 'following-link' });

$(' ').append($contributionsLink).insertAfter('.wds-global-navigation__user-menu li:nth-child(2)'); $(' ').append($followingLink).insertAfter('.wds-global-navigation__user-menu li:nth-child(3)'); $('.wds-global-navigation__user-menu a[data-tracking-label="account.help"]').remove; });

// change link targets (function {       // wikia logo in global navigation        $('.wds-global-navigation__logo').attr('href', 'http://community.wikia.com/wiki/Special:RecentChanges');        // WikiActivity button in page header        $('.wds-community-header__wiki-buttons .wds-button[data-tracking="wiki-activity"]').attr({ href: mw.util.wikiGetlink('Special:Insights'), title: 'Insights' });   });

// create talk page button in page header (function {       // make sure it's not in the talk or special namespace, make sure comments don't exist        if (config.wgNamespaceNumber % 2 !== 0 || $('.wds-button[href="#WikiaArticleComments"]').length ) {            return;        }

var $talkButton = $('').attr({               class: 'wds-button wds-is-squished wds-is-secondary',                href: mw.util.wikiGetlink(config.wgFormattedNamespaces[config.wgNamespaceNumber + 1] + ':' + config.wgTitle),                id: 'custom-talk-button'            }), $talkButtonIcon = $(' '), $talkButtonText = $(' Talk ');

$talkButton.append($talkButtonIcon, $talkButtonText).appendTo('.page-header__contribution-buttons'); $('#ca-talk').remove; });

// add link to most recent diff in page header à la Twinkle (function {       var $diffLink = $('').text('Last').attr({ href: articlePath + '?diff=cur', id: 'ca-diff' });

$(' ').append($diffLink).insertAfter('.page-header__contribution-buttons .wds-dropdown__content li:last-child'); });

// add link back to the subject namespace from a talk page diff (function {       // make sure it's in the talk namespace        if (config.wgNamespaceNumber % 2 == 0) {            return;        }

var $articleLink = $('') .text('Back to article') .attr('href', mw.util.wikiGetlink(config.wgFormattedNamespaces[config.wgNamespaceNumber - 1] + ':' + config.wgTitle));

// .page-header__subtitle is used in diffs, .page-header__page-subtitle for action=view $('.page-header__subtitle a').after(' | ', $articleLink); });

// disabling tracking which slows down every page submit // from User:452/global.js (function {       $('#editform').off('submit').on('submit', function { $(window).unbind('.leaveconfirm'); });   });

// additions to My Tools // modified from runescape:User:Quarenon/purge.js (function {       // add links        if ((config.wgAction == 'view' || config.wgAction == 'purge') && config.wgNamespaceNumber != -1) {            var $noCSS = $('').attr('href', articlePath + '?useusercss=0').text('Disable user CSS'),                $purge = $('').attr('href', articlePath + '?action=purge').text('Purge this page');

$('#my-tools-menu').prepend($(' ').append($noCSS)); $('#my-tools-menu').prepend($(' ').append($purge)); }

// change CSS var $backgroundColor = $('.wds-community-header .wds-dropdown__content').css('background-color'), $textColor = $('.wds-community-header .wds-dropdown__content').css('color'), $borderColor = $('.wds-community-header .wds-dropdown__content').css('border-color'); $('.WikiaBarWrapper .tools-menu').css({           'background': $backgroundColor,            'border-color': $borderColor,            'border-width': '1px',            'box-shadow': 'none',            'padding': '8px 9px',            'border-radius': '4px'        }); $('.WikiaBarWrapper .tools-menu > li').css('border', 'none'); $('.WikiaBarWrapper .tools-menu > li > a').css('color', $textColor); $('.WikiaBarWrapper .tools-menu > li a, .WikiaBarWrapper .tools-menu > li span').css({           'padding': '9px',            'font-size': '13px'        }); }); });