Diferencia entre revisiones de «MediaWiki:Launchpad.js»
Sin resumen de edición |
Sin resumen de edición |
||
Línea 25: | Línea 25: | ||
function setup() { | function setup() { | ||
div = createDiv( 'All OK!' ); | |||
div.parent( 'launchpad' ); | |||
} | } |
Revisión del 15:11 9 abr 2019
var Launchpad = {
/**
* Initialization script
* Load p5 and the CSS, and then build the GUI for each launchpad
*/
init: function () {
var launchpads = $( '#launchpad' )
if ( launchpads.length ) {
mw.loader.load( '/index.php?title=MediaWiki:Launchpad.css&action=raw&ctype=text/css', 'text/css' );
mw.loader.getScript( '//cdnjs.cloudflare.com/ajax/libs/p5.js/0.8.0/p5.min.js' ).then( function () {
mw.loader.getScript( '//cdnjs.cloudflare.com/ajax/libs/p5.js/0.8.0/addons/p5.dom.min.js' ).then( function () {
launchpads.each( Launchpad.build );
});
});
}
},
build: function () {
setup();
}
};
$( Launchpad.init );
function setup() {
div = createDiv( 'All OK!' );
div.parent( 'launchpad' );
}