From 00cb6ffb1c481e39810580ac2474c5fd1b4ca214 Mon Sep 17 00:00:00 2001 From: tdro Date: Sat, 23 Mar 2024 16:20:51 -0400 Subject: static/js/update: Add default state Handle more drift --- static/js/update.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'static') diff --git a/static/js/update.ts b/static/js/update.ts index 38d5925..1a3384f 100644 --- a/static/js/update.ts +++ b/static/js/update.ts @@ -13,6 +13,9 @@ return http; } + const state = "on"; + const key = "config.update"; + function update() { const url = self.location.href.split("#")[0].split("?")[0]; @@ -26,7 +29,7 @@ const modified = Date.parse(remote) > Date.parse(local); const drift = Date.parse(remote) - Date.parse(local); - if (drift < 3000) return; + if (drift < 10000) return; function reset() { indicator.href = anchor.href; -- cgit v1.2.3