diff options
Diffstat (limited to 'static/js')
| -rw-r--r-- | static/js/pichat.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/static/js/pichat.js b/static/js/pichat.js index 7611edb..ef45935 100644 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -440,11 +440,7 @@ function isDuplicateMessage(m) { function refresh() { var onSuccess = function(json) { try { - if (json.v && (typeof Version == 'undefined' || Version != json.v)) { - location.reload(); - } - - Timestamp = json.timestamp; + Timestamp = json.timestamp; $.map(json.messages, function(msg){ MessageContentCache[msg.msg_id.toString()] = msg.content }) @@ -624,7 +620,7 @@ function initChatThumb(){ $(this).attr("src", Imgs.chatThumb); $(this).stop().animate(Anim.chatThumb, 'fast'); } else { - $(this).stop().animate(Anim.chatThumbTiny, 'fast', 'swing', + $(this).delay(600).stop().animate(Anim.chatThumbTiny, 'fast', 'swing', function(){ $(this).attr("src", Imgs.chatThumbDot) $(this).animate(Anim.chatThumb, 0) @@ -634,6 +630,7 @@ function initChatThumb(){ }) } + function paletteToChat(img){ var chatText = $("#msgInput").val() if (chatText.length && chatText[chatText.length - 1] != " ") @@ -1214,7 +1211,8 @@ var HasFocus = true; function onFocus() { HasFocus = true; UnseenMsgCounter = 0; - $('title').text(OrigTitle); + // Courtesy http://stackoverflow.com/questions/2952384/changing-the-window-title-when-focussing-the-window-doesnt-work-in-chrome + window.setTimeout(function () { $('title').text(OrigTitle); }, 100); } function onBlur() { |
