Skip to content

Commit

Permalink
Fixed broken EPUB reader
Browse files Browse the repository at this point in the history
  • Loading branch information
svera authored Nov 19, 2023
1 parent b4d85e6 commit fdda9ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/webserver/embedded/views/epub-reader.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
var url = params && params.get("url") && decodeURIComponent(params.get("url"));
var currentSectionIndex = (params && params.get("loc")) ? params.get("loc") : undefined;

var document = ePub("/download/{{.Slug}}", {openAs: "epub"});
var rendition = document.renderTo("viewer", {
var doc = ePub("/download/{{.Slug}}", {openAs: "epub"});
var rendition = doc.renderTo("viewer", {
flow: "scrolled-doc"
});

Expand Down Expand Up @@ -98,7 +98,7 @@
prev.className = "btn disabled";
}

document.loaded.navigation.then(function (toc) {
doc.loaded.navigation.then(function (toc) {
let $select = document.getElementById("toc"),
docfrag = document.createDocumentFragment(),
loading = document.getElementById("loading");
Expand Down

0 comments on commit fdda9ad

Please sign in to comment.