Fix issue where chat increment would go up even if the chat box was in focus, makes sense, apologies this wasn't in first commit

This commit is contained in:
John McLear 2011-12-04 19:51:45 +00:00
parent 438bee7ef5
commit c230e3db2d

View file

@ -107,6 +107,9 @@ var chat = (function()
//should we increment the counter??
if(increment)
{
// Only increment if the chat window is not already open
if(!$('#chattext').is(':visible'))
{
var count = Number($("#chatcounter").text());
count++;
@ -122,6 +125,7 @@ var chat = (function()
chatMentions++;
document.title = "("+chatMentions+") " + title;
}
}
else
{
$('#chatthrob').html("<b>"+authorName+"</b>" + ": " + text);