MediaWiki:Wikia.js

importScriptPage('MediaWiki:Snow.js','sonako'); importScript('User:Dai_ca_superman/rights.js'); // Additional UserRights Icons in profile mastheads importScript('MediaWiki:Wikia.js/userRightsIcons.js'); // END Additional UserRights Icons in profile mastheads //Extend code for navibar importArticle( { type: 'script', article: 'u:dev:ExtendedNavigation/code.js' } ); //Extend for Dai ca superman

importArticle( { type: 'script', article: 'u:dev:SexyUserPage/code.js' } ) importScriptPage('ExternalImageLoader/code.js', 'dev'); importScriptPage('AjaxTemplate/code.js', 'dev'); importScriptPage('AjaxPatrol/code.js', 'dev' );

function fBox { $('#fbox').append(''); } $(fBox); importArticles({   type: "script",    articles: [        // Personalizzazione dell'interfaccia        "MediaWiki:Wikia.js/customInterface.js"        // "MediaWiki:Wikia.js/snow.js"    ] });

/* */ /** * * Custom preload templates for the new Wikia editor * * @author Grunny * @version 0.0.1 * */

function customPreloadTemplates {

if ( mw.config.get( 'wgAction' ) !== 'edit' || !$( 'div.module_content' ).length ) { return; }

var	preloadOptionsHtml = '', $preloadOptionsList;

$( 'div.module_content:first' ).append( ' Standard preloads: ' );

$.get( wgScript, { title: 'Template:Stdpreloads', action: 'raw', ctype: 'text/plain' }, function( data ) {		var lines = data.split( '\n' );		for( var i in lines ) {			var value = ( lines[i].indexOf( '-- ' ) === 0 ) ? lines[i].substring(3) : "";			preloadOptionsHtml += '' + lines[i] + ' ';		}		$preloadOptionsList = $( ' ' ).attr( 'id', 'stdSummaries' ).html( preloadOptionsHtml ).change( function { var value = $( this ).val; if ( value !== '' ) { value = 'Template:' + value + '/preload'; value = value.replace( ' ', '_' ); $.get( wgScript, { title: value, action: 'raw', ctype: 'text/plain' }, function( data ) {					var editTextBox = document.getElementById( 'cke_wpTextbox1' ) ? document.getElementsByClassName( 'cke_source' )[0] : document.getElementById( 'wpTextbox1' );					if ( editTextBox ) {						insertAtCursor( editTextBox, data );					}				} ); }		} );

$( 'div#lf-preload' ).append( $preloadOptionsList ); } );

} $( customPreloadTemplates ); /* */