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