diff options
author | Andrew Dolgov <[email protected]> | 2018-10-19 22:08:17 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-10-19 22:08:17 +0300 |
commit | 89a4710493417c4504aff824e7f89a42b7f9a9d0 (patch) | |
tree | 64bbfa12e047065a518a59a761230985468a10d0 /js | |
parent | c62fa6c187285713c41735ffa0c3f8a996671d73 (diff) |
open lastread location twice. why? i don't even care anymore
Diffstat (limited to 'js')
-rw-r--r-- | js/read.js | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -36,7 +36,13 @@ function open_lastread() { // CFI missing or w/e try { - if (item.cfi) book.rendition.display(item.cfi); + + // this is ridiculous tbh + if (item.cfi) book.rendition.display(item.cfi).then(() => { + book.rendition.display(item.cfi); + }); + + return; } catch (e) { console.warn(e); } @@ -52,7 +58,11 @@ function open_lastread() { try { if (item.cfi != data.cfi && (!item.page || data.page >= item.page)) - book.rendition.display(data.cfi); + console.log('using remote lastread...'); + + book.rendition.display(data.cfi).then(() => { + book.rendition.display(data.cfi); + }); } catch (e) { console.warn(e); } |