Merge pull request #165 from williamboman/master

Added chat clear keybinding.
This commit is contained in:
Mattias Erming 2014-09-19 21:54:42 +02:00
commit 452c4ecc88
1 changed files with 11 additions and 0 deletions

View File

@ -567,6 +567,17 @@ $(function() {
}
});
Mousetrap.bind([
"command+k",
"ctrl+l",
"ctrl+shift+l"
], function (e) {
// Only clear the chat if the main input is focused.
if( e.target === input[0] ) {
chat.find(".active .chat .messages").empty();
}
});
function complete(word) {
var words = commands.slice();
var users = chat.find(".active")