+ this.drawOffer = "threerep";
+ },
+ toggleChat: function() {
+ let modalChat = document.getElementById("modalChat");
+ modalChat.style.backgroundColor =
+ (modalChat.style.backgroundColor == "#e2e2e2"
+ ? "#c5fefe"
+ : "#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";