User:Cqm/ajaxrc.js

/** * AjaxRC tests */

/* // sample config code ( window.dev = window.dev || {} ).ajaxrc = { pages: [], indicator: '', refresh: 60000, text: '', hovertext: '' }

ajaxIndicator = window.ajaxIndicator || config.stylepath + '/common/images/ajax.gif', ajaxTimer, refreshText = typeof window.AjaxRCRefreshText === 'string' ? window.AjaxRCRefreshText : 'AJAX', refreshHover = typeof window.AjaxRCRefreshHoverText === 'string' ? window.AjaxRCRefreshHoverText : 'Enable auto-refreshing page loads', ajRefresh = window.ajaxRefresh || 60000, ajPages = window.ajaxPages || [ 'Special:RecentChanges' ],


 * ( function ( window, $, mw, Wikia, dev ) {

'use strict';

// Maintain backwards compatibility with older configuration options if ( !dev.ajaxrc ) { dev.ajaxrc = { pages: window.ajaxPages || [ 'Special:RecentChanges' ], indicator: window.ajaxIndicator || mw.config.get( 'stylepath' ) + '/common/images/ajax.gif', refresh: window.ajaxRefresh || 60000, text: typeof window.AjaxRCRefreshText === 'string' ? window.AjaxRCRefreshText : 'AJAX', hovertext: typeof window.AjaxRCRefreshHoverText === 'string' ? window.AjaxRCRefreshHoverText : 'Enable auto-refreshing page loads' };   }

dev.ajaxrc = $.extend( {       /**         * Default config options         */        pages: [ 'Special:RecentChanges' ],        indicator: mw.config.get( 'stylepath' ) + '/common/images/ajax.gif',        refresh: 60000,        // @todo make sure these are inserted using $( '.foo' ).text to make sure they're correctly escaped        text: 'AJAX',        hovertext: 'Enable auto-refreshing page loads',

/**        *         */        init: function  { console.log( 'foo' ); },

/**        *         */        storage: function  {

},

/**        *         */        preloadAjaxRL: function  {

},

/**        *         */        toggleAjaxRL: function  {

},

/**        *         */        loadPageData: function  {

},

/**        *         */        RecentChangesLocal: function  {

}   }, dev.ajaxrc || {} );

$( dev.ajaxrc.init );

}( this, this.jQuery, this.mediaWiki, this.Wikia, this.dev = this.dev || {} ) );