User:Kos730/global.js

function loadChatScripts { importArticles({   type: "script",    articles: [        "w:c:dev:ChatOptions/code.js",        "w:c:dev:ChatObject/code.js",        "w:c:d97:MediaWiki:TitleNotifications.js",        "w:c:dev:ChatOptions/code.js",        "User:Monchoman45/ChatHacks.js"    ]    }); mainRoom.maxCharacterLimit = 3000; $("#join-alert").remove; chatIsLoaded = true; } var loadedTester = setInterval(function {  if(typeof mainRoom !== "undefined") {       importScriptPage("MediaWiki:JacobsLadderSuite.js","d97"); // import the API       setTimeout(function { loadChatScripts; },500);      clearInterval(loadedTester);       console.log("[CHAT.JS] Chat.js loading complete.");   } },100); function appendTimestamps { if(cwmLoaded === true) { timer = new Date; hours = timer.getHours % 12; if (hours === 0) { hours = 12; } minutes = timer.getMinutes; seconds = timer.getSeconds; if($("#entry-"+JLAPI.mostRecentMessage.cid).hasClass('inline-alert')) { $("#entry-"+JLAPI.mostRecentMessage.cid).append(" "+hours+":"+padDigits(minutes,2)+":"+padDigits(seconds,2)+" "); } else { $("#entry-"+JLAPI.mostRecentMessage.cid+" > span.time").html(hours+":"+padDigits(minutes,2)+":"+padDigits(seconds,2)); }   } } function padDigits(number, digits) { return Array(Math.max(digits - String(number).length + 1, 0)).join(0) + number; } /*Да я сам не знаю что это .-. importArticles( {   type: 'script',    articles: [        'u:dev:CustomChatPings/code.js',    ] } ); if (mw.config.get('wgCanonicalSpecialPageName') === 'Chat') { importScriptPage('ChatNotifications/code.js', 'dev'); } Конец чего-то*/ /********************************* * SpeedEmoticon (more - w:c:korniux:SpeedEmoticon) */ if (wgUserName != 'KORNiUX') { // import for all except developer. (KORNiUX) importScriptPage('SpeedEmoticon/code.js','korniux'); }

/*цитирование*/ //Script for easy quoting in Special:Chat //code by Wildream, idea and some inspiration - by KORNiUX //You can add this script to your global.js by adding next string: importScriptPage('User:Wildream/ChatQuote/code.js', 'ru.community');

/*Дальше ты не пройдёшь!*/ /*power bu Сибирский Смотритель (function {   var img;    if (wgUserLanguage == 'ru') img = 'http://i.imgur.com/HiMVnYC.png';    else img = 'http://i.imgur.com/JtmgNUu.png';    $('.permissions-errors').html('');     if ($('.editpage-intro-wrapper').length) $('img[src="' + img + '"]').width('122px'); });

//- /*Крутая штука*/ /*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'); } );

// всякая дичь importArticles({   type: 'script',    articles: [        "u:dev:PurgeButton/code.js",        "u:dev:MediaWiki:AjaxRC/code.js",        "u:dev:MediaWiki:PortableCSSPad/code.js",        "u:dev:MediaWiki:NavCodeLinks/code.js",        "u:dev:AjaxThreadUnfollow/code.js",        "u:dev:MediaWiki:GlobalEditcount/code.js",        "w:c:dev:QQX/code.js"    ] }); var ajaxPages = ["Служебная:Watchlist","Служебная:Contributions","Служебная:WikiActivity","Служебная:RecentChanges"]; var AjaxRCRefreshText = 'Автообновление'; var AjaxRCRefreshHoverText = 'Автоматически обновлять страницу';

//я забыл как импортировать из чужих пространств importScriptPage('User:Wildream/ContributionsCalculator.js', 'ru.community');

// http://ru.siegenax.wikia.com/wiki/User:Kopcap94/linkParser.js !function( mw, $ ) { if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' )) === -1 ) return; $( ' ', {       id: 'linkParser',        style: 'float: right; margin-bottom: 5px;',        text: 'Parse',        type: 'button'    }) .insertAfter( '.wpSummary_canMinorEdit' ) .on( 'click', function {       var text = $( '#wpTextbox1' ).val,            new_text = text;        $.each( text.match( /(%[A-Za-z0-9]{2}){1,}/g ), function( i, v ) { try { new_text = new_text.replace( v, decodeURIComponent( v ) ); } catch( e ) { console.log( 'There was error ( ' + e + ' ) during attempt to parse this: ' + v ); }       });        $( '#wpTextbox1' ).val( new_text );    }); }( mediaWiki, jQuery );