User:TheDustyy/global.js

/* Автор: Frontwards */ document.querySelector('.wds-global-navigation__logo').href = '//shararam.wikia.com'; 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 = ['http://ru.peopleshararam.wikia.com|Народ Шарарама вики', 'http://ru.youtubers-of-shararam.wikia.com/wiki/%D0%AE%D1%82%D1%8C%D1%8E%D0%B1%D0%B5%D1%80%D1%8B_%D0%A8%D0%B0%D1%80%D0%B0%D1%80%D0%B0%D0%BC%D0%B0_%D0%92%D0%B8%D0%BA%D0%B8:%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F|Ютьюберы Шарарама вики']; $(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');