X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=app.js;h=0a1fffec568934802e4fb3c854b19f7badbf3b38;hb=3caec36fba44232e0d9157aadb9c06fdc4634c02;hp=d8719404449b07742cdd54656f354814782a6c0a;hpb=f8b43ef764be4e90761aa20d99af79a7e1c32bdd;p=xogo.git diff --git a/app.js b/app.js index d871940..0a1fffe 100644 --- a/app.js +++ b/app.js @@ -103,6 +103,7 @@ function showNewGameForm() { toggleVisible("newGameForm"); import(`/variants/${vname}/class.js`).then(module => { window.V = module.default; + for (const [k, v] of Object.entries(V.Aliases)) window[k] = v; prepareOptions(); }); } @@ -447,6 +448,7 @@ function initializeGame(obj) { const options = obj.options || {}; import(`/variants/${obj.vname}/class.js`).then(module => { window.V = module.default; + for (const [k, v] of Object.entries(V.Aliases)) window[k] = v; // Load CSS. Avoid loading twice the same stylesheet: const allIds = [].slice.call($.styleSheets).map(s => s.id); const newId = obj.vname + "_css";