- this.gameInfo.vname = vname;
- const vModule = await import("@/variants/" + vname + ".js");
- window.V = vModule.VariantRules;
- // Method to replace diagrams in loaded HTML
- const replaceByDiag = (match, p1, p2) => {
- const args = this.parseFen(p2);
- return getDiagram(args);
- };
- // (AJAX) Request to get rules content (plain text, HTML)
- this.content =
- require("raw-loader!@/translations/rules/" + vname + "/" + this.st.lang + ".pug")
- // Next two lines fix a weird issue after last update (2019-11)
- .replace(/\\n/g, " ").replace(/\\"/g, '"')
- .replace('module.exports = "', '').replace(/"$/, "")
- .replace(/(fen:)([^:]*):/g, replaceByDiag);
+ }
+ document.getElementById("modalOptions").checked = false;
+ if (this.whatNext == "analyze") this.gotoAnalyze(options);
+ else this.startGame(this.whatNext, options);