User:Asasyl/global.js

/* By Asasyl; */ document.querySelector('.wds-global-navigation__logo').href = 'http://ru.polandball.wikia.com/wiki/Polandball_%D0%B2%D0%B8%D0%BA%D0%B8'; var spanWiki = document.querySelector('.wds-dropdown__toggle span'); spanWiki.innerHTML = 'Семейка ПБВ'; var newLink = document.createElement('a'); newLink.className = 'wds-global-navigation__cc'; newLink.innerHTML = 'Вики Сообщества'; newLink.setAttribute('href','http://ru.community.wikia.com'); var nav = document.querySelector('.wds-global-navigation__content-bar-left'); nav.appendChild(newLink); window.gnWikiLinks = ['http://ru.polandball.wikia.com/wiki/Polandball_%D0%B2%D0%B8%D0%BA%D0%B8|Polandball Вики', 'http://ru.cityball.wikia.com/wiki/CityBall_%D0%B2%D0%B8%D0%BA%D0%B8|CityBall вики', 'http://ru.usersofpolandball.wikia.com/wiki/%D0%A3%D1%87%D0%B0%D1%81%D1%82%D0%BD%D0%B8%D0%BA%D0%B8_Polandball_%D0%B2%D0%B8%D0%BA%D0%B8|Участники Polandball вики', 'http://ru.wikiball.wikia.com/wiki/WikiBall_%D0%B2%D0%B8%D0%BA%D0%B8|WikiBall вики']; $(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)); }); }); /* -- */ var ind = 0; $(".wds-global-navigation__content-bar-left .wds-is-linked li").each(function{ ind++; $(this).attr("id","banus"+ind); });