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',        'u:dev:MediaWiki:ThemeToggler.js',        'u:dev:MediaWiki:NullEditButton/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' + '' + ''+ 'Fandomdesktop.js' + '' + ''+ 'Common.css</a>' + '</li>' + ''+ 'Fandomdesktop.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; }); });

$(function{ $('a').each(function{ var href = $(this).attr('href') $(this).click(function {   if(event.ctrlKey == true){        $(this).attr('href', href + "?action=edit")    } });});});

var config = mw.config.get(['wgScriptPath']); $('.wiki-tools').prepend('<svg class="wds-icon wds-icon-small"><use xlink:href="#wds-icons-bullet-list-small"> </a>'); $('.global-navigation__icon .wds-avatar .wds-avatar__image').wrap('</a>'); }); });