Created
October 18, 2012 00:20
-
-
Save pantlesswonder/3909166 to your computer and use it in GitHub Desktop.
plug.dj chat goes red when rate limit in effect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
if (Models.chat._sendChat) { return; } | |
Models.chat._sendChat = Models.chat.sendChat; | |
Models.chat.sendChat = function(value){ | |
var sent = this._sendChat(value); | |
if (sent) | |
{ | |
$('#chat-input-field').css({color: '#CC4141'}); | |
setTimeout(function(){$('#chat-input-field').css({color: '#fff'});}, this.rateLimit * 1000); | |
} | |
return sent; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment