User:Arhhhat/global.js

mw.loader.using('mediawiki.util').then(function { $(function{ importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:PortableCSSPad/code.js',        'u:dev:MediaWiki:QuickDiff/code.js',        'u:dev:MediaWiki:PurgeButton/code.js',        'u:dev:MediaWiki:ProtectionIcons.js',        'u:dev:MediaWiki:View_Source/code.js',    ] });

/*Выпадающее меню https://dev.fandom.com/wiki/MediaWiki:CodeLinksDropdown.js*/ $('.wds-global-navigation__user-menu .wds-dropdown__content').addClass('wds-is-not-scrollable'); mw.hook('dev.i18n').add(function (lib) {   lib.loadMessages('CodeLinksDropdown').then(function (i18n) { var config = mw.config.get([           'wgFormattedNamespaces',            'wgUserName',            'wgScriptPath'        ]); $('.wds-dropdown.wds-open-to-right.is-attached-to-bottom > .wds-dropdown__content > ul.wds-list > li:nth-child(2)').after(           ''+                '' +                    i18n.msg('codelinks').escape +                     '' +                        '' +                        ' ' +                    ' ' +                '' +                    '' + '' + ''+ 'Common.js' + '' + ''+ 'Wikia.js' + '' + ''+ 'Common.css</a>' + '</li>' + ''+ 'Wikia.css</a>' + '</li>' + ''+ 'Восьмидневник</a>' + '</li>' + '</ul>' + ' ' +           '</li>' );   }); }); importArticle({ type: 'script', article: 'u:dev:I18n-js/code.js' }); $('.wds-dropdown-level-2 .wds-dropdown-level-2__content .wds-list.wds-is-linked>li#quick-cup').remove; $('.wds-dropdown-level-2 .wds-dropdown-level-2__content .wds-list.wds-is-linked>li>a[data-id="contributions"]').remove; $('.wds-dropdown-level-2 .wds-dropdown-level-2__content .wds-list.wds-is-linked>li#MySandbox>a').remove;

mw.loader.using('mediawiki.api').then(function{	if (mw.config.get('wgWikiaEnvironment') !== "sandbox") return;	if (mw.config.get('skin') === "fandomdesktop") return;	if (mw.config.get('wgCanonicalSpecialPageName') === "ThemeDesigner") return;	new mw.Api.saveOption('skin','fandomdesktop').then(function { location.reload; }); }); }); });