diff options
Diffstat (limited to 'static/js/pichat.js')
| -rw-r--r-- | static/js/pichat.js | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/static/js/pichat.js b/static/js/pichat.js index 84a9b79..e2ab061 100644 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -352,26 +352,6 @@ function isDuplicateMessage(m) { } } -var CurrentTopic = null; - -function isSameTopic(curTopic, newTopic) { - if (!!curTopic != !!newTopic) { return false; } - else if (!curTopic) { return false; } // => !newTopic also - else { - return curTopic.topic == newTopic.topic && - curTopic.deadline == newTopic.deadline && - curTopic.maker == newTopic.maker; - } -} - -function updateTopic(newTopic) { - if (isSameTopic(CurrentTopic, newTopic)) { return; } - alert('new topic'); - CurrentTopic = newTopic; - $('#topic').text(topic.topic); - -} - function refresh() { var onSuccess = function(json) { try { @@ -390,9 +370,6 @@ function refresh() { if (typeof UnseenMsgCounter !== 'undefined' && !HasFocus) { UnseenMsgCounter += messages.length; } - if (json.topic) { - updateTopic(json.topic); - } } catch(e) { if (IsAdmin && window.console) { console.error(e); @@ -976,7 +953,7 @@ function parseDomain(host){ // Away notification var UnseenMsgCounter = 0; -var OrigTitle = $('title').text(); +var OrigTitle = ""; var HasFocus = true; function onFocus() { @@ -1004,3 +981,7 @@ function startTitleUpdater() { $(window).focus(onFocus); setTimeout(titleUpdater, 2000); } + +$(function() { + OrigTitle = $('title').text(); +});
\ No newline at end of file |
