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' ), |
|||
// these two scripts loaded in /etc/mediawiki/LocalSettings.php |
|||
import Siteswap from "/js/siteswap.mjs"; |
|||
var siteswapnr = "531"; |
var siteswapnr = "531"; |
||
console.log("siteswapnr " + siteswapnr); |
console.log("siteswapnr " + siteswapnr); |
Revision as of 10:55, 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));