From 109260e46c0b99c924852b280989a1ab59e9c793 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Sat, 6 Apr 2013 20:56:47 -0500 Subject: [PATCH] Fix chat messages not working for anonymous users --- www/assets/js/functions.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/www/assets/js/functions.js b/www/assets/js/functions.js index 9fe9f9e2..e42a082b 100644 --- a/www/assets/js/functions.js +++ b/www/assets/js/functions.js @@ -131,15 +131,17 @@ function addUserDropdown(entry, name) { function formatChatMessage(data) { var div = $("
"); - if(data.msg.toUpperCase().indexOf(uname.toUpperCase()) != -1) { - div.addClass("nick-highlight"); - if(!FOCUSED) { - TITLE_BLINK = setInterval(function() { - if(document.title == "*Chat*") - document.title = PAGETITLE; - else - document.title = "*Chat*"; - }, 1000); + if(uname) { + if(data.msg.toUpperCase().indexOf(uname.toUpperCase()) != -1) { + div.addClass("nick-highlight"); + if(!FOCUSED) { + TITLE_BLINK = setInterval(function() { + if(document.title == "*Chat*") + document.title = PAGETITLE; + else + document.title = "*Chat*"; + }, 1000); + } } } if(data.msgclass == "action") {