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([       'skin',        'wgTitle',        'wgAction',        'wgFormattedNamespaces',        'wgNamespaceNumber',        'wgArticlePath',        'wgPageName'    ]);

var articlePath = mw.util.wikiGetlink(config.wgPageName);

if (config.skin == 'oasis') {

// modify user dropdown in global navigation var $contributionsLink = $('').text('My Contributions').attr({           class: 'wds-global-navigation__dropdown-link',            href: mw.util.wikiGetlink('Special:MyContributions'),            id: 'contributions-link'        }); var $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 // 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 if (config.wgNamespaceNumber % 2 !== 0) { 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 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');

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

// add links to My Tools // modified from runescape:User:Quarenon/purge.js if ((config.wgAction == 'view' || config.wgAction == 'purge') && config.wgNamespaceNumber != -1) {

var $noCSS = $('').attr('href', articlePath + '?useusercss=0').text('Disable user CSS'); var $purge = $('').attr('href', articlePath + '?action=purge').text('Purge this page');

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

}

}

});