mounted: function() {
document.addEventListener('visibilitychange', this.visibilityChange);
["peopleWrap", "infoDiv", "newgameDiv"].forEach(eltName => {
- let elt = document.getElementById(eltName);
- elt.addEventListener("click", processModalClick);
+ document.getElementById(eltName)
+ .addEventListener("click", processModalClick);
});
document.querySelectorAll("#predefinedCadences > button").forEach(b => {
b.addEventListener("click", () => {
const vModule = await import("@/variants/" + vname + ".js");
this.newchallenge.V = vModule.VariantRules;
this.newchallenge.vname = vname;
- if (!!cb)
- cb();
+ if (!!cb) cb();
},
trySetNewchallDiag: function() {
if (!this.newchallenge.fen) {
this.newchallenge.vid = pchall.vid;
this.newchallenge.cadence = pchall.cadence;
this.newchallenge.randomness = pchall.randomness;
- this.issueNewChallenge();
+ this.loadNewchallVariant(this.issueNewChallenge);
},
issueNewChallenge: async function() {
if (!!(this.newchallenge.cadence.match(/^[0-9]+$/)))