MS DH; add context to timeago events

This commit is contained in:
Dan Hansen 2011-06-02 15:10:08 -05:00
parent 9f05ac1f33
commit 0f0c033c26

View file

@ -6,8 +6,8 @@
Diaspora.widgets.add("timeago", function() { Diaspora.widgets.add("timeago", function() {
this.selector = "abbr.timeago"; this.selector = "abbr.timeago";
this.start = function() { this.start = function() {
Diaspora.widgets.subscribe("stream/scrolled", this.updateTimeAgo); Diaspora.widgets.subscribe("stream/scrolled", this.updateTimeAgo, this);
Diaspora.widgets.subscribe("stream/reloaded", this.updateTimeAgo); Diaspora.widgets.subscribe("stream/reloaded", this.updateTimeAgo, this);
if(this.timeAgoElement().length) { if(this.timeAgoElement().length) {
this.updateTimeAgo(); this.updateTimeAgo();