summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-09-17 21:53:51 +0300
committerAndrew Dolgov <[email protected]>2021-09-17 21:53:51 +0300
commite6033294d714094887298cbb5ad7bab3510ee8a6 (patch)
tree1b5d705370121333a5b342d69e03f508b61a7ca6 /js
parent4fd9b8f2b5a98bfcde57970b48fed2488a80f356 (diff)
* reduce LOCATION_DIVISOR to make page count more believable
* use LOCATION_DIVISOR in TOC lists
Diffstat (limited to 'js')
-rw-r--r--js/reader.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/reader.js b/js/reader.js
index 235213f..7f4fd82 100644
--- a/js/reader.js
+++ b/js/reader.js
@@ -7,7 +7,7 @@ const DEFAULT_FONT_FAMILY = "Georgia";
const DEFAULT_LINE_HEIGHT = 140;
const MIN_LENGTH_TO_JUSTIFY = 32; /* characters */
-const LOCATION_DIVISOR = 20;
+const LOCATION_DIVISOR = 10;
const PAGE_RESET_PROGRESS = -1;
const Reader = {
@@ -464,7 +464,7 @@ const Reader = {
return k.indexOf(cfiBase) != -1
});
- return window.book.locations.locationFromCfi(loc);
+ return parseInt(window.book.locations.locationFromCfi(loc) / LOCATION_DIVISOR);
} catch (e) {
console.warn(e);