User:MACH-59330/global.js

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

// global header recolor function gnaviclr { if ( document.querySelector('.wds-global-navigation') !== null ) { mw.util.addCSS('' +       '.skin-oasis .wds-global-navigation-wrapper .wds-global-navigation {\n' +            '\tbackground-color: ' + wgSassParams['color-buttons'] + ';\n' +        '}'); }   if ( document.querySelector('.pph-wiki-header') !== null ) { mw.util.addCSS('' +       '.skin-oasis .pph-wiki-header {\n' +            '\tbox-shadow: inset 15px 15px 20px 0 ' + wgSassParams['color-buttons'] + ';\n' +        '}'); } }

// global footer recolor function gfootclr { if ( document.querySelector('.wds-global-footer') !== null ) { mw.util.addCSS('' +       '.skin-oasis .wds-global-footer {\n' +            '\tbackground-color: ' + wgSassParams['color-buttons'] + ';\n' +        '}'); } }

// source editor recolor function sourceclr { if ( document.querySelector('.editor') !== null && skin == 'oasis' ) { mw.util.addCSS('' +       '.wds-global-navigation, .EditPageHeader, .EditPage .module > h3 {\n' +            '\tbackground-color: ' + wgSassParams['color-buttons'] + ' !important;\n' +        '}' +        '.WikiaPage {\n' +            '\tborder-color: ' + wgSassParams['color-buttons'] + ' !important;\n' +        '}'); } }

// chat link for premium page header function pphchat { if ( document.querySelector('.pph-wiki-header') !== null ) { var pphexpdpdn = document.querySelector('.pph-local-nav-explore .pph-local-nav-l2'), pphchatli = document.createElement('li'), pphchata = document.createElement('a'), pphtxtchat = document.createTextNode('Chat'); pphchatli.setAttribute('class','pph-local-nav-item-l2'); pphchata.setAttribute('href','/wiki/Special:Chat'); pphexpdpdn.appendChild(pphchatli); pphexpdpdn.lastChild.appendChild(pphchata); pphexpdpdn.lastChild.lastChild.appendChild(pphtxtchat); } }

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