+ updateSettings: function(event) {
+ const propName =
+ event.target.id.substr(3).replace(/^\w/, c => c.toLowerCase())
+ localStorage[propName] = ["highlight","coords"].includes(propName)
+ ? event.target.checked
+ : event.target.value;
+ },
+ setDisplay: function() {
+ // Prevent set display if there is a running game
+ if (!!localStorage["variant"])
+ return;
+ if (!location.hash)
+ location.hash = "#room"; //default
+ const hashParts = location.hash.substr(1).split("?");
+ this.display = hashParts[0];
+ this.queryHash = hashParts[1]; //may be empty, undefined...