From 07ffd94029b6ca88e1a563fa6a9e0d1be42c0c05 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 3 Mar 2017 14:12:28 +0300 Subject: add support for swipe detection --- read.html | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'read.html') diff --git a/read.html b/read.html index 4f6be0d..0af201a 100644 --- a/read.html +++ b/read.html @@ -320,6 +320,16 @@ init_taps(); document.onkeydown = hotkey_handler; + EPUBJS.Hooks.register("beforeChapterDisplay").swipeDetection = function(callback, renderer) { + + EPUBJS.core.addScripts(["/books/lib/bootstrap/v3/js/jquery.js", + "/books/lib/jquery.mobile-1.4.5.js", + "/books/js/swipes.js" ], null, renderer.doc.head); + + if (callback) callback(); + } + + var book = ePub({ restore: false, }); -- cgit v1.2.3