User:MACH-59330/global.js

// Chat link in community header mw.loader.using('mediawiki.util').then(function {   if (!$('.wds-community-header').exists || mw.loader.getState('ext.Chat2') === null) {      return;    }    var $wch_ul = $('.wds-community-header .wds-tabs__tab')                .has('#wds-icons-explore-tiny')                .find('.wds-list'),        $wch_a = $('', { 'href': mw.util.wikiGetlink('Special:Chat'), text: 'Chat' }),       $wch_li = $('').append($wch_a);    $wch_ul.append($wch_li); });

// Open chat in new tab window.wgWikiaChatWindowFeatures = '';

// Global imports importArticles({   type: 'script',    articles: [        'u:tes:Common.js/DiscussionsLinks.js',        'u:dev:ConsistentModules/code.js',        'u:dev:DiscussionsFeed.js',        'u:dev:DiscussionsRailModule/code.js',        'u:dev:GlobalChatJS.js',        'u:dev:SeeMoreActivityButton/code.js',        'u:dev:SkinSwitchButton/code.js',        'u:dev:WorkingMoreUsersCount.js',        'u:dev:UnsafeScripts/code.js'        // 'u:de.trollocool:VanguardTools.js',        // 'u:dev:PortableCSSPad/code.js',        //  using these in Tampermonkey for quick toggling    ] });

// Import user styling into JS pages mw.loader.using('mediawiki.util').then(function {   // Scope to code editor pages    if (!document.body.classList.contains('codeeditor')) {        return;    }    // Resource parameters    var p = {            'debug': 'false',            'lang': 'en',            'modules': 'user',            'only': 'styles',            'skin': 'oasis',            'user': mw.config.get('wgUserName')        };    // URI building    var u = mw.config.get('wgLoadScript') +        [$.param(p), '*'].join('&');    // Load user styling    mw.loader.load(u, 'text/css'); });