mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Load new messages every X seconds
This commit is contained in:
parent
461be89d85
commit
ae88c3246c
@ -18,7 +18,8 @@ TimWolla.WCF ?= {}
|
|||||||
@bindEvents()
|
@bindEvents()
|
||||||
@refreshRoomList()
|
@refreshRoomList()
|
||||||
new WCF.PeriodicalExecuter $.proxy(@refreshRoomList, this), 60e3
|
new WCF.PeriodicalExecuter $.proxy(@refreshRoomList, this), 60e3
|
||||||
|
new WCF.PeriodicalExecuter $.proxy(@getMessages, this), @config.reloadTime * 1000
|
||||||
|
|
||||||
$('#chatInput').focus()
|
$('#chatInput').focus()
|
||||||
###
|
###
|
||||||
# Binds all the events needed for Tims Chat.
|
# Binds all the events needed for Tims Chat.
|
||||||
@ -208,7 +209,7 @@ TimWolla.WCF ?= {}
|
|||||||
# break if input contains only whitespace
|
# break if input contains only whitespace
|
||||||
return false if $('#chatInput').val().trim().length is 0
|
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'),
|
$.ajax $('#chatForm').attr('action'),
|
||||||
data:
|
data:
|
||||||
|
Loading…
Reference in New Issue
Block a user