- localStorage[propName] = ["highlight","coords"].includes(propName)
- ? event.target.checked
- : event.target.value;
- },
- adjustBoard: function() {
- const board = document.querySelector(".game");
- if (!board)
- return; //no board on page
- const multiplier = document.getElementById("myRange").value;
- const boardSize = 10 * multiplier;
- localStorage.setItem("boardSize", boardSize);
- board.style.width = boardSize + "px";
+ let value = (["bcolor","sound"].includes(propName)
+ ? event.target.value
+ : event.target.checked);
+ if (propName == "sound")
+ value = parseInt(value);
+ store.updateSetting(propName, value);