diff options
author | Andrew Dolgov <[email protected]> | 2019-07-29 19:36:36 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2019-07-29 19:36:36 +0300 |
commit | 8c79c715bc91ad2937857b4bdb5d772cedd014b1 (patch) | |
tree | 0f227fcee0524420c3ddb1b681fb45214912d704 /js/index.js | |
parent | 869833b7a3faa2d0195d787c69d90e9a90373315 (diff) |
show loading message while refreshing cache
Diffstat (limited to 'js/index.js')
-rw-r--r-- | js/index.js | 5 |
1 files changed, 5 insertions, 0 deletions
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); } |