From b8ae4b31c129031e89e4c7fb9801d6761513dd73 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 26 Feb 2017 00:14:30 +0300 Subject: experimental service worker offline stuff --- js/offline.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 js/offline.js (limited to 'js/offline.js') 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); + + + } + + }); + + }); + }); + +} -- cgit v1.2.3