User:ImperatorBomb/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.luntik.wikia.com|Лунтик Вики', 'http://ru.losyash-library.wikia.com|Библиотека Лосяша', 'http://ru.peopleshararam.wikia.com|Народ Шарарама вики', 'http://ru.swrolevie.wikia.com|Ролевые /шв/ вики']; $(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); });

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:AjaxPatrol.js',    ] });

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:EditBio/code.js',    ] });

importArticles({   type: "script",    articles: [        "u:dev:ModernProfile/EditButton.js"    ] });

importArticles({   type: 'script',    articles: [        // ...        'u:kocka:MediaWiki:Emoticons/code.js',        // ...    ] });

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:DiscussionsViewer/code.js',    ] });

importArticles({   type: 'script',    articles: [        'u:dev:ModernProfile/EditButton.js',    ] });

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:MassPatrol/code.js',    ] });

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:GlobalNavBehavior.js',    ] });

if ( mwCustomEditButtons ) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "https://vignette.wikia.nocookie.net/sy233-ms/images/c/c2/Кавычки.png/revision/latest?cb=20180704114832&path-prefix=ru", "speedTip": "Кавычки", "tagOpen": "«", "tagClose": "»", "sampleText": "Введите текст" };   mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "https://vignette.wikia.nocookie.net/sy233-ms/images/5/56/Дефис.png/revision/latest?cb=20180704115844&path-prefix=ru", "speedTip": "Дефис", "tagOpen": "—" }; }

function addWikifButton { var toolbar = document.getElementById('toolbar'); if (!toolbar) return; var i = document.createElement('img'); i.src = 'http://upload.wikimedia.org/wikisource/ru/d/d1/Button-wikifikator.png'; i.alt = i.title = 'викификатор'; i.onclick = Wikify; i.style.cursor = 'pointer'; toolbar.appendChild(i); } if (wgAction == 'edit' || wgAction == 'submit') { importScriptURI('http://ru.wikipedia.org/w/index.php?title=MediaWiki:Gadget-wikificator.js&action=raw&ctype=text/javascript'); addOnloadHook(addWikifButton); }

// http://ru.community.wikia.com/wiki/User:Wildream/ContributionsCalculator.js importScriptPage('User:Wildream/ContributionsCalculator.js', 'ru.community');

/*Magic Spells - by ShermanTheMythran*/ $('.WikiaBarWrapper .tools').append(' » ▲ ● ► ▼ #trigger{font-size:16px;color:white !important;display:inline-block;cursor:default;transition:transform .5s;-moz-transition:-moz-transform .5s;-webkit-transition:-webkit-transform .5s;-o-transition:-o-transform .5s}.spell{display:inline-block;color:white !important;margin:0 3px;vertical-align:top;cursor:pointer;transition:transform .5s,text-shadow .5s;-moz-transition:-moz-transform .5s,text-shadow .5s;-webkit-transition:-webkit-transform .5s,text-shadow .5s;-o-transition:-o-transform .5s,text-shadow .5s}.spell:hover{text-shadow:0 0 4px silver} '); $('#MagicSpells').mouseenter(function {	$('.spell').toggle('slow');	$('#trigger').css({'transform':'rotateY(180deg)','-moz-transform':'rotateY(180deg)','-webkit-transform':'rotateY(180deg)','-ms-transform':'scaleX(-1)','-o-transform':'scaleX(-1)'}); } ); $('#MagicSpells').mouseleave(function {	$('.spell').toggle('slow');	$('#trigger').css({'transform':'rotateY(0deg)','-moz-transform':'rotateY(0deg)','-webkit-transform':'rotateY(0deg)','-ms-transform':'scaleX(1)','-o-transform':'scaleX(1)'}); } ); $('.scroll-top').click(function {	$(this).parents('html, body').animate({scrollTop:0}, 'slow'); } ); $('#toggle-ads').toggle(function {	$('#toggle-ads').attr('title','Show ads');	$('.wikia-ad, .SelfServeUrl, .home-top-right-ads').hide('slow'); },	function {		$('#toggle-ads').attr('title','Hide ads');		$('.wikia-ad, .SelfServeUrl, .home-top-right-ads').show('slow');	} ); $('#hide-rail').toggle(function {	$('#hide-rail').css({'transform':'rotateY(180deg)','-moz-transform':'rotateY(180deg)','-webkit-transform':'rotateY(180deg)','-ms-transform':'scaleX(-1)','-o-transform':'scaleX(-1)'});	$('#hide-rail').attr('title', 'Show rail');	$('.WikiaRail').hide('slow');	$('.WikiaMainContent').animate({width:'1010'}, 'slow'); },	function {		$('#hide-rail').css({'transform':'rotateY(0deg)','-moz-transform':'rotateY(0deg)','-webkit-transform':'rotateY(0deg)','-ms-transform':'scaleX(1)','-o-transform':'scaleX(1)'});		$('#hide-rail').attr('title', 'Hide rail');		$('.WikiaRail').show('slow');		$('.WikiaMainContent').animate({width:'670'}, 'slow');	} ); $('.scroll-bottom').click(function {	$(this).parents('html, body').animate({scrollTop: $(document).height}, 'slow'); } );