User:Eladkse/wikia.js

/* AJAX RC */ var	ajaxTimer, ajaxRefresh = 60000, doRefresh = true;

if ( !window.ajaxCallAgain ) { var ajaxCallAgain = []; }

function preloadAJAXRL { $( '#ajaxLoadProgress' ).ajaxSend( function ( event, xhr, settings ) {		if ( location.href == settings.url ) {			$( this ).show;		}	} ).ajaxComplete ( function ( event, xhr, settings ) {		var	$collapsibleElements = $( '#mw-content-text' ).find( '.mw-collapsible' );		if ( location.href == settings.url ) {			$( this ).hide;			for ( var i = 0; i < ajaxCallAgain.length; i++ ) {				ajaxCallAgain[i];			}			if ( $collapsibleElements.length ) {				$collapsibleElements.makeCollapsible;			}			if ( mw.config.get( 'wgNamespaceNumber' ) === -1 && mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Recentchanges' ) {				mw.special.recentchanges.init;			}		}	} ); loadPageData; }

function loadPageData { var cC = '#mw-content-text'; $('#mw-content-text').load( location.href + " #mw-content-text > *", function ( data ) {		if ( doRefresh ) {			ajaxTimer = setTimeout( loadPageData, ajaxRefresh );		}	} ); }

$( function {	if ( wgPageName == 'Special:RecentChanges' ) {		preloadAJAXRL;	} } );