MediaWiki:Common.js: Difference between revisions

From jugglingpatterns
No edit summary
No edit summary
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
// use by using Template:AnimateSiteswap which provides the matching html
// 'scripts' => array( '/js/animation-widget-standalone.mjs', 'js/siteswap.mjs' ),
import("/js/animation.js");
// these two scripts loaded in /etc/mediawiki/LocalSettings.php
import("/js/mydarkreader.js");

var siteswapnr = "531";
console.log("siteswapnr " + siteswapnr);
var sw=new Siteswap(siteswapnr);
var myjson = {jugglers:2, limbs:"ABCD"};
console.log(JSON.stringify(sw));
myjson.props=Array.apply(null, Array(sw.nProps)).map(function () {return {}})
var jif=sw.toJif(myjson);
console.log(JSON.stringify(jif));

Latest revision as of 14:03, 16 November 2023

// use by using Template:AnimateSiteswap which provides the matching html
import("/js/animation.js");
import("/js/mydarkreader.js");