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
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300

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();