X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=public%2Fjavascripts%2Fcomponents%2Fgame.js;h=208e04824cfda2b5e37c8f8570b97b23e6d711f1;hb=331fc58c932d6d7055b202d0c6dc0d77212a89f8;hp=c949c29bcaabb9bf8228ab96482b9eca5a2f06c0;hpb=61a262b2a441bb27d87701f7d3818723b3ac913d;p=vchess.git diff --git a/public/javascripts/components/game.js b/public/javascripts/components/game.js index c949c29b..208e0482 100644 --- a/public/javascripts/components/game.js +++ b/public/javascripts/components/game.js @@ -20,7 +20,7 @@ Vue.component('my-game', { hints: (getCookie("hints") === "1" ? true : false), color: getCookie("color", "lichess"), //lichess, chesscom or chesstempo // sound level: 0 = no sound, 1 = sound only on newgame, 2 = always - sound: getCookie("sound", "2"), + sound: parseInt(getCookie("sound", "2")), }; }, render(h) { @@ -660,6 +660,7 @@ Vue.component('my-game', { "value": "0", innerHTML: "None" }, + attrs: { "selected": this.sound==0 }, } ), h("option", @@ -668,6 +669,7 @@ Vue.component('my-game', { "value": "1", innerHTML: "Newgame" }, + attrs: { "selected": this.sound==1 }, } ), h("option", @@ -676,6 +678,7 @@ Vue.component('my-game', { "value": "2", innerHTML: "All" }, + attrs: { "selected": this.sound==2 }, } ), ],