User:SENSEI2 WU/global.js

/* Автор: Frontwards */ document.querySelector('.wds-global-navigation__logo').href ='//https://flowercity.fandom.com/ru/wiki/%D0%A6%D0%B2%D0%B5%D1%82%D0%BE%D1%87%D0%BD%D1%8B%D0%B9_%D0%B3%D0%BE%D1%80%D0%BE%D0%B4_%D0%B2%D0%B8%D0%BA%D0%B8:%D0%97%D0%B0%D0%BF%D1%80%D0%BE%D1%81%D1%8B_%D0%BD%D0%B0_%D1%81%D1%82%D0%B0%D1%82%D1%83%D1%81%D1%8B'; 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); /* Автор куска: Fngplg */ window.gnWikiLinks = ['https://flowercity.fandom.com/ru/wiki/%D0%A6%D0%B2%D0%B5%D1%82%D0%BE%D1%87%D0%BD%D1%8B%D0%B9_%D0%B3%D0%BE%D1%80%D0%BE%D0%B4_%D0%B2%D0%B8%D0%BA%D0%B8|Цветочный город вики','https://countryballs.fandom.com/ru/wiki/Countryballs_%D0%B2%D0%B8%D0%BA%D0%B8|Countryballs вики', 'https://test.fandom.com/ru/wiki/%D0%A2%D0%B5%D1%81%D1%82_%D0%B2%D0%B8%D0%BA%D0%B8|Тест вики']; $(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); }); /* Значки */ function svgReplacer (selector, path, square) { var thisSelector = document.querySelector(selector); thisSelector.innerHTML = path; thisSelector.style.width = square; thisSelector.style.height = square; } svgReplacer('#wds-icons-bell', ' ', '20px'); svgReplacer('#wds-icons-message', ' ', '20px'); svgReplacer('#wds-icons-flag', ' ', '18px');