diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/index.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/js/index.js b/js/index.js index 28e1227..2ec26f3 100644 --- a/js/index.js +++ b/js/index.js @@ -197,3 +197,22 @@ function show_summary(elem) { return false; } + +function offline_get_all() { + + if (confirm("Download all books on this page?")) { + + $(".index_cell").each(function (i, row) { + var bookId = $(row).attr("id").replace("cell-", ""); + var dropitem = $(row).find(".offline_dropitem")[0]; + + if (bookId) { + offline_cache(bookId, function() { + mark_offline(dropitem); + }); + } + }); + } + +} + |