mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 06:37:10 -04:00
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:
parent
438bee7ef5
commit
c230e3db2d
1 changed files with 16 additions and 12 deletions
|
@ -108,19 +108,23 @@ var chat = (function()
|
|||
//should we increment the counter??
|
||||
if(increment)
|
||||
{
|
||||
var count = Number($("#chatcounter").text());
|
||||
count++;
|
||||
$("#chatcounter").text(count);
|
||||
// chat throb stuff -- Just make it throw for twice as long
|
||||
if(wasMentioned)
|
||||
{ // If the user was mentioned show for twice as long and flash the browser window
|
||||
if (chatMentions == 0){
|
||||
title = document.title;
|
||||
// Only increment if the chat window is not already open
|
||||
if(!$('#chattext').is(':visible'))
|
||||
{
|
||||
var count = Number($("#chatcounter").text());
|
||||
count++;
|
||||
$("#chatcounter").text(count);
|
||||
// chat throb stuff -- Just make it throw for twice as long
|
||||
if(wasMentioned)
|
||||
{ // If the user was mentioned show for twice as long and flash the browser window
|
||||
if (chatMentions == 0){
|
||||
title = document.title;
|
||||
}
|
||||
$('#chatthrob').html("<b>"+authorName+"</b>" + ": " + text);
|
||||
$('#chatthrob').effect("pulsate", {times:1,mode:"hide"},4000);
|
||||
chatMentions++;
|
||||
document.title = "("+chatMentions+") " + title;
|
||||
}
|
||||
$('#chatthrob').html("<b>"+authorName+"</b>" + ": " + text);
|
||||
$('#chatthrob').effect("pulsate", {times:1,mode:"hide"},4000);
|
||||
chatMentions++;
|
||||
document.title = "("+chatMentions+") " + title;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue