X-Git-Url: https://git.auder.net/?p=xogo.git;a=blobdiff_plain;f=app.js;h=a6ee234aed96c204a2d7dd1ba63a46b5a1fdaa5b;hp=d8719404449b07742cdd54656f354814782a6c0a;hb=e5f9342704d2a453c3cd2f84e31b1ea384b2d03d;hpb=c4f9a79a31ee0305b18853616b3ee19ad4451a63 diff --git a/app.js b/app.js index d871940..a6ee234 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; + V.Aliases.forEach(e => window[e.key] = e.val); prepareOptions(); }); } @@ -447,6 +448,7 @@ function initializeGame(obj) { const options = obj.options || {}; import(`/variants/${obj.vname}/class.js`).then(module => { window.V = module.default; + V.Aliases.forEach(e => window[e.key] = e.val); // Load CSS. Avoid loading twice the same stylesheet: const allIds = [].slice.call($.styleSheets).map(s => s.id); const newId = obj.vname + "_css";