From 8c79c715bc91ad2937857b4bdb5d772cedd014b1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 29 Jul 2019 19:36:36 +0300 Subject: show loading message while refreshing cache --- js/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/index.js b/js/index.js index ea8c763..b3138b7 100644 --- a/js/index.js +++ b/js/index.js @@ -12,6 +12,11 @@ function cache_refresh(force) { if (force || !stamp || ts - stamp > 3600 * 24 * 7) { console.log('asking worker to refresh cache'); + + $(".dl-progress") + .fadeIn() + .html("Loading, please wait..."); + navigator.serviceWorker.controller.postMessage("refresh-cache"); localforage.setItem("epube.cache-timestamp", ts); } -- cgit v1.2.3