User:Sophiedp/global.js

//UserAccountAge config window.UAAeditcount = true;

//Hide the toolbar $('#WikiaBar').hide;

//Ace editor stuff if (mw.config.get('wgAction') === 'edit' && $('.codeeditor').exists) { $('#WikiaBar, #HelpLink').remove; $('body').removeClass('wikia-bar-visible'); mw.util.addCSS(':root { --rail-right: 0; }'); if (!$('.EditPageHeader #NotificationsLink > a > span').text) { $('.EditPageHeader #NotificationsLink').hide; }   setTimeout(function  {        $(window).trigger('resize');        ace.edit('editarea').getValue.setValue(ace.edit('editarea').getValue.replace(/\n{2}$/, ''), -1);        var emmy = ace.edit('editarea').getValue;        $(window)            .unbind('beforeunload')            .on('beforeunload', function  { if (emmy !== ace.edit('editarea').getValue) { return $.msg('wikia-editor-leaveconfirm-message'); }       });    }, 100);    importArticle({        type: 'style',        article: 'u:dev:MediaWiki:FixAceWidemode.css'    }); }

//Show warning if editing MW without admin if (   !['7931', '1927'].includes(mw.config.get('wgCityId')) &&    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'    }); }

//Imports importArticles({   type: 'script',    articles: [        'u:dev:ProtectionIcons.js',        'u:dev:UnhideUserMasthead/code.js',        'u:dev:UserAccountAge/code.js',        'u:dev:VanguardTools.js',        'u:kocka:User:KockaAdmiralac/AutoWideCodeeditor.javascript',        'u:kocka:User:KockaAdmiralac/MoveTools.javascript'    ] }); importScriptPage('MediaWiki:ChatConnect.3.js', 'internal-community');