From e8e50381292a6532cdc3c2802f37262b279fe30b Mon Sep 17 00:00:00 2001 From: Kevin Hamer Date: Sun, 11 Oct 2020 15:31:58 -0400 Subject: fix automatic reload logic --- layouts/partials/js.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'layouts/partials') diff --git a/layouts/partials/js.html b/layouts/partials/js.html index b398fbe..fbe102c 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -88,8 +88,8 @@ lastUpdated.innerHTML = '{{ T "lastChecked" }} ' + timeSince(lastUpdate) + ' {{ T "someTimeAgo" }}'; // Refresh almost every 5m - if (lastUpdate > 290000) { - location.reload; + if (Math.floor(new Date() - lastUpdate) > 290000) { + location.reload(); } } }, 5000) -- cgit v1.2.3-70-g09d2