#3322 properly, @barisusakli so no need to copy pasta everywhere timeago is used

This commit is contained in:
psychobunny
2015-08-17 16:26:35 -04:00
parent 370a7ae2fb
commit 3d962822c6
3 changed files with 13 additions and 6 deletions

View File

@@ -203,6 +203,15 @@
return text.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
},
overrideTimeago: function() {
var timeagoFn = $.fn.timeago;
$.fn.timeago = function() {
timeagoFn.apply(this, arguments).each(function() {
$(this).attr('title', (new Date($(this).attr('title'))).toString());
});
};
},
toISOString: function(timestamp) {
if (!timestamp || !Date.prototype.toISOString) {
return '';