+ // Settings initialized with values from localStorage
+ Vue.prototype.$settings = {
+ bcolor: localStorage["bcolor"] || "lichess",
+ sound: parseInt(localStorage["sound"]) || 2,
+ hints: parseInt(localStorage["hints"]) || 1,
+ coords: !!eval(localStorage["coords"]),
+ highlight: !!eval(localStorage["highlight"]),
+ sqSize: parseInt(localStorage["sqSize"]),
+ };
+ const socketCloseListener = () => {
+ Vue.prototype.$conn = new WebSocket(params.socketUrl + "/?sid=" + myid);
+ }
+ Vue.prototype.$conn.onclose = socketCloseListener;