overrideTimeago only needs to be called once

This commit is contained in:
psychobunny
2015-08-22 12:21:51 -04:00
parent 0caa095ea4
commit 7fa4057051
2 changed files with 14 additions and 15 deletions

View File

@@ -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 '';