From ae88c3246c067268a8de551379e78ea13f133586 Mon Sep 17 00:00:00 2001 From: max-m Date: Mon, 26 Dec 2011 18:46:48 +0100 Subject: [PATCH] Load new messages every X seconds --- file/js/TimWolla.WCF.Chat.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/file/js/TimWolla.WCF.Chat.coffee b/file/js/TimWolla.WCF.Chat.coffee index 81842b9..d578681 100644 --- a/file/js/TimWolla.WCF.Chat.coffee +++ b/file/js/TimWolla.WCF.Chat.coffee @@ -18,7 +18,8 @@ TimWolla.WCF ?= {} @bindEvents() @refreshRoomList() new WCF.PeriodicalExecuter $.proxy(@refreshRoomList, this), 60e3 - + new WCF.PeriodicalExecuter $.proxy(@getMessages, this), @config.reloadTime * 1000 + $('#chatInput').focus() ### # Binds all the events needed for Tims Chat. @@ -208,7 +209,7 @@ TimWolla.WCF ?= {} # break if input contains only whitespace return false if $('#chatInput').val().trim().length is 0 - @freeTheFish() if $('#chatInput').val().trim() is '/free the fish' + @freeTheFish() if $('#chatInput').val().trim().toLowerCase() is '/free the fish' $.ajax $('#chatForm').attr('action'), data: