Commit | Line | Data |
---|---|---|
b6487fb9 BA |
1 | // TODO: |
2 | //à chaque onChange, envoyer matching event settings update | |
3 | //(par exemple si mise à jour du nom, juste envoyer cet update aux autres connectés ...etc) | |
81da2786 BA |
4 | setMyname: function(e) { |
5 | this.myname = e.target.value; | |
6 | localStorage["username"] = this.myname; | |
7 | }, | |
8 | showSettings: function(e) { | |
9 | this.getRidOfTooltip(e.currentTarget); | |
10 | document.getElementById("modal-settings").checked = true; | |
11 | }, | |
12 | toggleHints: function() { | |
13 | this.hints = !this.hints; | |
14 | localStorage["hints"] = (this.hints ? "1" : "0"); | |
15 | }, | |
16 | setBoardColor: function(e) { | |
17 | this.bcolor = e.target.options[e.target.selectedIndex].value; | |
18 | localStorage["bcolor"] = this.bcolor; | |
19 | }, | |
20 | setSound: function(e) { | |
21 | this.sound = parseInt(e.target.options[e.target.selectedIndex].value); | |
22 | localStorage["sound"] = this.sound; | |
23 | }, |