Fix infinite scroll javascript in jammed js

This commit is contained in:
Raphael Sofaer 2011-04-07 15:22:03 -07:00
parent 157b117469
commit d8ac8d1329

View file

@ -9,6 +9,9 @@ Diaspora.widgets.add("timeago", function() {
this.selector = "abbr.timeago";
this.start = function() {
InfiniteScroll.postScrollCallback = function(){
Diaspora.widgets.timeago.updateTimeAgo();
}
if(Diaspora.widgets.i18n.language === "en") {
return;
}
@ -32,13 +35,10 @@ Diaspora.widgets.add("timeago", function() {
};
Diaspora.widgets.timeago.updateTimeAgo("abbr");
};
this.updateTimeAgo = function(selector) {
$(selector || this.selector).timeago();
};
});
InfiniteScroll.postScrollCallback = function(){
Diaspora.widgets.timeago.updateTimeAgo();
}