Fix jquery timeago update did not really work

This commit is contained in:
Bernd Bestel
2018-08-04 16:54:46 +02:00
parent e830805443
commit 5a13cb5ffe

View File

@@ -71,7 +71,12 @@ if (window.localStorage.getItem("sidebar_state") === "collapsed")
$.timeago.settings.allowFuture = true;
RefreshContextualTimeago = function()
{
$('time.timeago').timeago();
$("time.timeago").each(function()
{
var element = $(this);
var timestamp = element.attr("datetime");
element.timeago("update", timestamp);
});
}
RefreshContextualTimeago();