diff options
author | Zach Copley <zach@status.net> | 2009-11-16 22:25:58 +0000 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2009-11-16 22:25:58 +0000 |
commit | fb646654a25dd13b38cd177f3236d8e9f2d9bbb9 (patch) | |
tree | aa6adb31690afa58278db4b7e79f167e769cea28 | |
parent | bcc414bc9f7f7993abcf3ccb8c6b895017b99d85 (diff) | |
parent | 8b4fd414218d162970cf997d260e070d0a5177fe (diff) |
Merge branch '0.8.x'
-rw-r--r-- | plugins/Realtime/realtimeupdate.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index e82b4dbfb..2ded33e93 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -34,6 +34,8 @@ RealtimeUpdate = { _favorurl: '', _deleteurl: '', _updatecounter: 0, + _updatedelay: 500, + _maxnotices: 50, init: function(userid, replyurl, favorurl, deleteurl) { @@ -76,11 +78,20 @@ RealtimeUpdate = { $("#notices_primary .notices").prepend(noticeItem); $("#notices_primary .notice:first").css({display:"none"}); $("#notices_primary .notice:first").fadeIn(1000); + + if ($('#notices_primary .notice').length > RealtimeUpdate._maxnotices) { + $("#notices_primary .notice:last .form_disfavor").unbind('submit'); + $("#notices_primary .notice:last .form_favor").unbind('submit'); + $("#notices_primary .notice:last #notice_in-reply-to").unbind('click'); + $("#notices_primary .notice:last").remove(); + } + + NoticeFavors(); NoticeReply(); RealtimeUpdate._updatecounter += 1; document.title = '('+RealtimeUpdate._updatecounter+') ' + DT; - }, 500); + }, RealtimeUpdate._updatedelay); }, makeNoticeItem: function(data) |