Fix infinite scroll javascript in jammed js
This commit is contained in:
parent
157b117469
commit
d8ac8d1329
1 changed files with 4 additions and 4 deletions
|
|
@ -9,6 +9,9 @@ Diaspora.widgets.add("timeago", function() {
|
||||||
this.selector = "abbr.timeago";
|
this.selector = "abbr.timeago";
|
||||||
|
|
||||||
this.start = function() {
|
this.start = function() {
|
||||||
|
InfiniteScroll.postScrollCallback = function(){
|
||||||
|
Diaspora.widgets.timeago.updateTimeAgo();
|
||||||
|
}
|
||||||
if(Diaspora.widgets.i18n.language === "en") {
|
if(Diaspora.widgets.i18n.language === "en") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -32,13 +35,10 @@ Diaspora.widgets.add("timeago", function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
Diaspora.widgets.timeago.updateTimeAgo("abbr");
|
Diaspora.widgets.timeago.updateTimeAgo("abbr");
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.updateTimeAgo = function(selector) {
|
this.updateTimeAgo = function(selector) {
|
||||||
$(selector || this.selector).timeago();
|
$(selector || this.selector).timeago();
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
InfiniteScroll.postScrollCallback = function(){
|
|
||||||
Diaspora.widgets.timeago.updateTimeAgo();
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue