MediaWiki:Common.js: Difference between revisions

From jugglingpatterns
No edit summary
Tag: Manual revert
No edit summary
Line 1: Line 1:
import Siteswap from "/js/siteswap.mjs";
//import Siteswap from "/js/siteswap.mjs";


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

Revision as of 11:11, 15 November 2023

//import Siteswap from "/js/siteswap.mjs";

//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));