+ resetChatColor: function() {
+ // TODO: this is called twice, once on opening an once on closing
+ document.getElementById("chatBtn").style.backgroundColor = "#e2e2e2";
+ },
+ finishSendChat: function(chat) {
+ // NOTE: anonymous chats in corr games are not stored on server (TODO?)
+ if (this.game.type == "corr" && this.st.user.id > 0)
+ GameStorage.update(this.gameRef.id, {chat: chat});
+ },
+ processChat: function() {
+ if (!document.getElementById("modalChat").checked)
+ document.getElementById("chatBtn").style.backgroundColor = "#c5fefe";
+ },
+ gameOver: function(score, scoreMsg) {