diff options
author | Andrew Dolgov <[email protected]> | 2017-02-26 00:14:30 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-02-26 00:14:30 +0300 |
commit | b8ae4b31c129031e89e4c7fb9801d6761513dd73 (patch) | |
tree | 4522dc5c059837a8c143c2a90c1dc562db0915ff /js/offline.js | |
parent | f858879a3d13bcec694a5e2493fbfe3a1a233e13 (diff) |
experimental service worker offline stuff
Diffstat (limited to 'js/offline.js')
-rw-r--r-- | js/offline.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/js/offline.js b/js/offline.js new file mode 100644 index 0000000..d9bed0b --- /dev/null +++ b/js/offline.js @@ -0,0 +1,23 @@ +var CACHE_NAME = "epube-test"; + +function populate_list() { + + var books = $("#books_container"); + + window.caches.open(CACHE_NAME).then(function(cache) { + cache.keys().then(function(items) { + + $.each(items, function(i, req) { + + if (req.url.match(/\.epub/)) { + console.log(req.url); + + + } + + }); + + }); + }); + +} |