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; }

//- /*Крутая штука*/ /*Magic Spells - by ShermanTheMythran*/ $('.WikiaBarWrapper .tools').append(' » ▲ ● ► ▼ #trigger{font-size:16px;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'); } );

var qtMessageWallGreetingTemplate = '';

var qtEnableUserPageOverwrite = true; var qtEnableMessageWallGreetingOverwrite = true;

// всякая дичь 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",        "u:dev:QQX/code.js",        "u:dev:QuickCreateUserPage/code.js",        "w:dev:QuickCreateMessageWallGreeting/code.js",        "u:dev:CommentPreview/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 );