- updateStorage: function() {
- if (!localStorage.getItem("myid"))
- {
- localStorage.setItem("myid", this.myid);
- localStorage.setItem("variant", variant);
- localStorage.setItem("mycolor", this.mycolor);
- localStorage.setItem("oppid", this.oppid);
- }
+ setStorage: function() {
+ localStorage.setItem("myid", this.myid);
+ localStorage.setItem("variant", variant);
+ localStorage.setItem("mycolor", this.mycolor);
+ localStorage.setItem("oppid", this.oppid);
+ localStorage.setItem("fenStart", this.fenStart);
+ localStorage.setItem("moves", JSON.stringify(this.vr.moves));