User:Jormun/global.js

// ?uselang=qqx in one click if ((location.href.indexOf('?uselang=qqx') + 1) === 0) { $qqxLink = $('').append(' QQX me! '); $('.tools').append($qqxLink); $('#qqxme').click(function {        location.href = wgServer + '/wiki/' + wgPageName + '?uselang=qqx';    }); } else { $qqxLink = $('').append(' UnQQX me! '); $('.tools').append($qqxLink); $('#qqxme').click(function {        location.href = wgServer + '/wiki/' + wgPageName;    }); }

//Back To Top button //Created by Noemon from Dead Space Wiki, translate from ru.elderscrolls.wikia function hideFade { // hide #backtotop first $( "#backtotop" ).hide ; // fade in #backtotop $( function {		$( window ).scroll( function  { if ( $( this ).scrollTop > ButtonStart ) { $( '#backtotop' ).fadeIn ; } else { $( '#backtotop' ).fadeOut ; }		});	}); } function goToTop { // scroll body to 0px on click $( 'body,html' ).animate ({		scrollTop: 0	}, ScrollSpeed ); return false; } function addBackToTop { if( skin == 'oasis' ) { $('Наверх ').appendTo('#WikiaBarWrapper .toolbar > .tools'); hideFade ; }	} var ButtonStart = 800; var ScrollSpeed = 600; if( !window.BackToTop ) { $( document ).ready( function { 		addBackToTop ; 	}); } var BackToTop = true; // prevent duplication

//chat quote

function ChatQuote { $('.Chat li .message').each(function {        if ($(this).children.length === 0) {            $(this).append(' [quote] ').click(function  { $('.message > textarea').val($('.message > textarea').val + ' ' + $(this).prevAll('.username:first').text + ': "' + $(this).text.toString.replace('[quote]', '') + '"'); });       }    }); } setInterval(ChatQuote, 1000);

//subnavs window.onload = function { $('.GlobalNavigation > li').mouseover.mouseout.children.removeAttr('href'); $('.GlobalNavigation').unbind; $('.topNav').click(function {        if (!$(this).find('.subnav').hasClass('show')) {            $(this).find('.subnav').addClass('show');        } else {            $('.subnav').removeClass('show'); //hide all subnavs        }    }); }

//autoeditdropdown window.AutoEditDropdownConfig = { expandedAreaContribute: true, expandedAreaEdit: false }; importArticles({ type: 'script', articles: [ 'w:c:dev:AutoEditDropdown/code.js' ] });

//wallgreetingbutton importArticles({   type: 'script',    articles: [        'w:dev:WallGreetingButton/code.js'    ] });

//css pad importArticles({   type: 'script',    articles: [        'w:dev:PortableCSSPad/code.js'    ] });

// purge importScriptPage( 'PurgeButton/code.js', 'dev' ); // Кнопка очистки кэша страницы var PurgeButtonText = 'Обновить';

//wham importScriptPage('WHAM/code.js', 'dev'); //wham++ importScriptPage('AjaxBatchDelete/code.js', 'dev'); //chathack importScriptPage('User:Monchoman45/ChatHacks.js', 'c'); //advanced wiki-activity importScriptPage('User:Wildream/AdvancedWikiActivity/code.js', 'ru.community'); //Оповещения //importScriptPage('User:Wildream/SoundNotifications.js', 'ru.community'); //sovsek importScriptURI('https://internal.wikia-inc.com/index.php?title=MediaWiki:ForcePreview.js&action=raw&ctype=text/javascript');