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'    ]);

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

// modify user dropdown in global navigation $('My Contributions').insertAfter('.wds-global-navigation__user-menu .wds-dropdown__content li:nth-child(2)'); $('My Followed Pages').insertAfter('.wds-global-navigation__user-menu .wds-dropdown__content li:nth-child(3)'); $('.wds-global-navigation__user-menu .wds-dropdown__content li 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: '/wiki/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;

});

// 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 articlePath = config.wgArticlePath.replace('$1', config.wgPageName); 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));

}

}

});