vendor/assets/javascripts/base/_timeago.js in active_frontend-14.0.77 vs vendor/assets/javascripts/base/_timeago.js in active_frontend-14.0.78
- old
+ new
@@ -18,10 +18,11 @@
Timeago.VERSION = '1.0.0';
Timeago.DEFAULTS = {
approximate: true,
maxRelative: false,
+ onRefreshCallback: function () {},
showNow: false,
showSeconds: false,
spacing: true,
text: {
prefixes: {
@@ -69,9 +70,10 @@
return this.startTimer();
};
Timeago.prototype.refresh = function () {
this.updateTime();
+ this.options.onRefreshCallback();
return this.updateInterval();
};
Timeago.prototype.updateTime = function () {
var timeStr = this.timeAgoInWords(this.$time);