diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2026-05-24 12:58:01 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2026-05-24 12:58:01 +0300 |
| commit | 141b6fe2b7d6ec2a74704501af71c6629d994f30 (patch) | |
| tree | 05288ba751ce5268cface901f2de677359197bf3 /src/reader.js | |
| parent | 274f5594c30f5d128db2fd458f96b4436b1dbb66 (diff) | |
| download | the-epube-141b6fe2b7d6ec2a74704501af71c6629d994f30.tar.gz the-epube-141b6fe2b7d6ec2a74704501af71c6629d994f30.tar.xz | |
lint/type fixes
Diffstat (limited to 'src/reader.js')
| -rw-r--r-- | src/reader.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/reader.js b/src/reader.js index fe253ec..8623643 100644 --- a/src/reader.js +++ b/src/reader.js @@ -2,7 +2,7 @@ 'use strict'; -/* global localforage, EpubeApp, ePub, Cookie, AppCommon, $ */ +/* global localforage, EpubeApp, ePub, Cookie, AppCommon, $, setupCsrfPrefilter */ const DEFAULT_FONT_SIZE = 16; const DEFAULT_FONT_FAMILY = "Arial"; @@ -12,7 +12,7 @@ const MIN_LENGTH_TO_JUSTIFY = 32; /* characters */ const LOCATION_DIVISOR = 10; const PAGE_RESET_PROGRESS = -1; -/* exported ReaderClass */ +/* eslint-disable-next-line no-unused-vars */ class ReaderClass extends AppCommon { csrf_token = ""; @@ -49,6 +49,12 @@ class ReaderClass extends AppCommon { verticalDistanceThreshold: 80, // px — vertical movement before cancelling }; + constructor() { + super(); + + this.book = new ePub.Book(); + } + onTouchStart(evt) { const touch = evt.touches[0] || evt.changedTouches[0]; @@ -279,7 +285,7 @@ class ReaderClass extends AppCommon { } async openBookData(book_data) { - this.book = new ePub.Book(); + //this.book = new ePub.Book(); try { await this.book.open(book_data); |
