[fix] book stat dom
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Evan Reichard 2023-11-04 00:04:31 -04:00
parent 71898c39e7
commit cce0ef2de1

View File

@ -120,26 +120,20 @@ class EBookReader {
// Load Progress
let { cfi } = await this.getCFIFromXPath(this.bookState.progress);
let getStats = async function () {
// Start Timer
this.bookState.pageStart = Date.now();
// Get Stats
let stats = await this.getBookStats();
this.updateBookStatElements(stats);
}.bind(this);
// Register Content Hook
this.rendition.hooks.content.register(getStats);
// Update Position
await this.setPosition(cfi);
// Highlight Element - DOM Has Element
let { element } = await this.getCFIFromXPath(this.bookState.progress);
// Set Progress Element & Highlight
this.bookState.progressElement = element;
this.highlightPositionMarker();
// Update Stats & Page Start
let stats = await this.getBookStats();
this.updateBookStatElements(stats);
this.bookState.pageStart = Date.now();
}
initDevice() {