MediaWiki:Common.js: Difference between revisions
From jugglingpatterns
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
// 'scripts' => array( '/js/animation-widget-standalone.mjs', 'js/siteswap.mjs' ), |
// 'scripts' => array( '/js/animation-widget-standalone.mjs', 'js/siteswap.mjs' ), |
||
// these two scripts loaded in /etc/mediawiki/LocalSettings.php |
// these two scripts loaded in /etc/mediawiki/LocalSettings.php |
||
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)); |
Revision as of 10:17, 15 November 2023
// 'scripts' => array( '/js/animation-widget-standalone.mjs', 'js/siteswap.mjs' ), // these two scripts loaded in /etc/mediawiki/LocalSettings.php 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));