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??
|
//should we increment the counter??
|
||||||
if(increment)
|
if(increment)
|
||||||
{
|
{
|
||||||
var count = Number($("#chatcounter").text());
|
// Only increment if the chat window is not already open
|
||||||
count++;
|
if(!$('#chattext').is(':visible'))
|
||||||
$("#chatcounter").text(count);
|
{
|
||||||
// chat throb stuff -- Just make it throw for twice as long
|
var count = Number($("#chatcounter").text());
|
||||||
if(wasMentioned)
|
count++;
|
||||||
{ // If the user was mentioned show for twice as long and flash the browser window
|
$("#chatcounter").text(count);
|
||||||
if (chatMentions == 0){
|
// chat throb stuff -- Just make it throw for twice as long
|
||||||
title = document.title;
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue