User:Jgirault/Kartodeveloper.js

(function ( mw, $ ) {

mw.Kartodeveloper = {}; mw.Kartodeveloper.helpers = {};

function formatScriptURI( scriptName ) { return 'https://www.mediawiki.org/w/index.php?title=User:Jgirault/Kartodeveloper/' + scriptName + '&action=raw&ctype=text/javascript'; }

// on load $( function {

// download all dependencies $.when(			$.getScript( formatScriptURI( 'helpers/GeoJSON.js' ) ),			$.getScript( formatScriptURI( 'helpers/SinglePointMap.js' ) ),			$.getScript( formatScriptURI( 'helpers/MultiplePointMap.js' ) ),			$.getScript( formatScriptURI( 'helpers/HTML.js' ) ),			$.Deferred( function ( deferred ) { $( deferred.resolve ); } )		).done( function {			//place your code here, the scripts are all loaded

console.log( '*** Kartodeveloper READY ***' ); console.log( mw.Kartodeveloper ); mw.hook( 'wikipage.kartodeveloper' ).fire( mw.Kartodeveloper ); } );	} );

})( mediaWiki, jQuery );