User:MetroKaiser/global.js

//1. Imports importArticles({   type: "script",    articles: [        'u:dev:MediaWiki:FollowDropdown/code.js',        'u:dev:MediaWiki:WallGreetingButton/code.js',        'u:dev:MediaWiki:ViewRemoved/code.js',        'u:dev:MediaWiki:ContribsLink/code.js',        'u:dev:MediaWiki:SmoothGlobalNav/code.js',        'u:dev:MediaWiki:Rollback/code.js',    ] });

//2. WAM window.railWAM = { logPage: 'Участник:MetroKaiser/WAM log', loadOnPage: 'Служебная:WikiActivity', lang: 'ru', }; importArticles({   type: 'script',    articles: [        // ...        'u:dev:MediaWiki:RailWAM/code.js'    ] });

//3. Favorite wikies in the navigation var spanWiki = document.querySelector('.wds-dropdown__toggle span'); spanWiki.innerHTML = 'Вики'; window.gnWikiLinks = ['//ru.five-nights-at-freddys.wikia.com|FNaF Вики', '//ru.wikies.wikia.com|Викии Вики', '//rainbowsix.fandom.com|Rainbow Six Wiki', '//rainbowsix.fandom.com/ru|Rainbow Six Вики']; $(function {    var $menu = $('.wds-global-navigation__link-group .wds-list'),        links = window.gnWikiLinks || [];    if (!$menu.length || !links.length) return;    links.forEach(function (v) { var link = v.replace(/\[|\]/g, ''), $a = $('', {               href: (/(.*?)\||$/.exec(link) || {})[1] || link,                text: (/\|(.*)/.exec(link) || {})[1] || link,                title: link        }); $menu.prepend($('').append($a)); }); });