User:Sophiedp/global.js

//Imports importArticles({   type: 'script',    articles: [        'u:dev:ChatBanLogModal.js',        'u:dev:UnhideUserMasthead/code.js',        'u:dev:UserAccountAge/code.js',        'u:dev:VanguardTools.js'    ] });

//Chatconnect if (mw.config.get('wgCityId') === '177') { importScriptPage('MediaWiki:ChatConnect.3.js', 'internal-community'); }

//Extend ProtectionIcons to work in the MW namespace if (   mw.config.get('wgCityId') !== '7931' &&    mw.config.get('wgNamespaceNumber') === 8 &&    !/sysop/.test(mw.config.get('wgUserGroups')) ) { mw.hook('dev.wds').add(function (wds) {       $('#ca-edit svg').hide;        $('#ca-edit').prepend( wds.icon('alert-small') ).attr('title', 'You are editing this page without admin powers!');   }); importArticle({       type: 'script',        article: 'u:dev:WDSIcons/code.js'    }); } importArticle({   type: 'script',    article: 'u:dev:ProtectionIcons.js', });

//Make VanguardTools not overlap with the edge of the page mw.hook('dev.van').add(function {    $('.van-tools-menu li:last a').text('Dashboard'); });

//Make threads easier to archive if (   mw.config.get('wgCityId') === '177' &&    mw.config.get('wgNamespaceNumber') === 1201 &&    !$('.deleteorremove-infobox').exists &&    $('.page-header__page-subtitle > nav > a[title="My wall"]').exists ) { $('.WikiaPage .page-header__separator').append(''); }