User:Sophiedp/global.js

/* Remove autofill delete reason */ if (mw.config.get('wgAction') === 'delete') { document.getElementById('wpReason').removeAttribute('value'); }

/* Community Central only JS */ if (mw.config.get('wgCityId') === '177') { /* Use dark theme */ mw.config.set('wgIsDarkTheme', true); document.body.classList.add('oasis-dark-theme'); mw.hook('dev.highlight').add(function (hljs) {       hljs.loadAllLanguages.then(function (hl) { hl.highlightBlock($('pre')[0]); });   });    importArticle({ type: 'script', article: 'u:dev:MediaWiki:Highlight-js.js' }); /* Import script for archiving my wall */ if ($('.page-header__page-subtitle > nav > a[title="My wall"]').exists) { mw.loader.load('https://a-sina.herokuapp.com/archive.js'); } }

/* Enable importing quick create scripts */ window.vanguardToolsConfig = { create: true };

/* Imports */ importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:MaximizeAce.js',        'u:dev:MediaWiki:VanguardTools.js'    ] }, {    type: 'style',    article: 'u:dev:MediaWiki:DarkGlobalNavDropdowns.css' });

/* Deal with the toolbar (and things that may be added to it) */ mw.loader.load('https://a-sina.herokuapp.com/toolmenu.js');