mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 05:55:48 +01:00
overrideTimeago only needs to be called once
This commit is contained in:
@@ -203,19 +203,6 @@
|
||||
return text.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
|
||||
},
|
||||
|
||||
overrideTimeago: function() {
|
||||
var timeagoFn = $.fn.timeago;
|
||||
$.fn.timeago = function() {
|
||||
var els = timeagoFn.apply(this, arguments);
|
||||
|
||||
if (els) {
|
||||
els.each(function() {
|
||||
$(this).attr('title', (new Date($(this).attr('title'))).toString());
|
||||
});
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
toISOString: function(timestamp) {
|
||||
if (!timestamp || !Date.prototype.toISOString) {
|
||||
return '';
|
||||
|
||||
Reference in New Issue
Block a user