1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-04-24 03:33:14 +00:00
Ross Williams 22a93a28e2 Refactor epub reader progress calculation
The code in epub-progress.js was causing the epub file to be loaded
twice over the network, because it created a second instance of the
epub.js library. I moved all the progress percentage display code into
epub.js. Only the locationchange polyfill code was left in the separate
file, renamed to locationchange-polyfill.js.

I rewrote the percentage progress code to use epub.js events,
giving more succinct and readable code. Also, I added localStorage
caching of the epub location calculations, required for displaying
percentage progress, which can take up to 60-90 seconds to calculate on
longer ebooks. This localStorage caching approach is recommended by
epub.js in the `locations.html` example in their repo.

Signed-off-by: Ross Williams <ross@ross-williams.net>
2025-02-21 04:15:37 +00:00
..
2024-11-04 21:20:34 +01:00
2024-09-16 17:25:37 +02:00
2024-12-07 07:27:00 +01:00
2024-12-07 07:27:00 +01:00
2024-11-23 15:46:20 +01:00
2022-05-22 12:49:00 +01:00
2024-09-07 20:07:45 +02:00
2024-11-26 06:13:18 +01:00
2024-11-16 13:39:04 +01:00
2022-05-21 21:52:59 +01:00
2024-11-28 14:47:52 +01:00
2024-06-20 19:12:46 +02:00
2024-08-18 10:59:39 +02:00
2023-01-21 15:23:18 +01:00
2022-04-30 10:17:41 +02:00
2024-07-02 20:53:08 +02:00
2025-01-06 17:38:25 +01:00
2024-11-23 15:46:20 +01:00
2024-11-23 10:39:55 +01:00
2024-11-23 15:46:20 +01:00
2024-07-29 20:08:17 +02:00
2024-07-15 19:38:54 +02:00
2024-12-07 07:27:00 +01:00
2021-10-04 19:23:24 +02:00
2024-10-28 16:16:28 +01:00
2024-08-21 19:25:50 +02:00
2024-11-11 18:46:07 +01:00