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',        'wgCanonicalNamespace',        '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.wgCanonicalNamespace.toLowerCase.search('talk') == -1) && config.wgCanonicalNamespace != 'Special') { if (config.wgCanonicalNamespace == '') { var talkButtonLink = '/wiki/Talk:' + config.wgTitle; } else { var talkButtonLink = '/wiki/' + config.wgCanonicalNamespace + '_talk:' + config.wgTitle; };               var $talkButton = $('').attr({                    'class': 'wds-button wds-is-squished wds-is-secondary',                    'href': talkButtonLink,                    'id': 'custom-talk-button'                }); var $talkButtonIcon = $(' '); var $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.wgCanonicalNamespace != 'Special') {

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

};

};

});