Added help-button in chat

This commit is contained in:
Kasper Rynning-Tønnesen
2018-09-26 10:31:17 +02:00
parent f1b3ccad98
commit 9e18b85218
3 changed files with 14 additions and 3 deletions

View File

@@ -488,6 +488,14 @@ function addDynamicListeners() {
//document.getElementById("chatForm").submit();
});
addListener("click", "#chat_help", function(event) {
this.preventDefault(),
this.stopPropagation();
document.getElementById("text-chat-input").value = "/help";
Chat.chat(document.getElementById("chatForm").input);
document.getElementById("chat_submit").focus();
});
addListener("click", "#offline-mode", function(event){
this.preventDefault();
if(!Crypt.get_offline()){