User:Sophiedp/global.js

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

/* Community Central only JS */ if (location.host === 'community.fandom.com') { /* Use dark theme */ var eve = mw.config.get('wgCanonicalSpecialPageName'); if (       mw.config.get('wgIsEditPage') ||        $('#theme-solarized-light').exists ||        eve === 'AbuseLog' || eve === 'AbuseFilter'    ) { mw.config.set('wgIsDarkTheme', true); document.body.classList.add('oasis-dark-theme'); if ($('#theme-solarized-light').exists) { 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'); } }

//testing var ashtyn = document.querySelector('.ns-8:not(.wiki-dev) #ca-edit'); if (!wgUserGroups.includes('sysop') && ashtyn) { ashtyn.style.opacity = '0.5'; }

/* Imports */ importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:MaximizeAce.js',        'u:dev:MediaWiki:ProtectionIcons.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'); var star = document.createElement('ul'); star.id = 'my-tools-menu'; document.querySelector('#WikiaBar .tools').prepend(star);