mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
fix link event name in rendition
This commit is contained in:
parent
16d9c4aa53
commit
c6631d10b7
2 changed files with 2 additions and 2 deletions
|
@ -37,7 +37,7 @@
|
||||||
var params = URLSearchParams && new URLSearchParams(document.location.search.substring(1));
|
var params = URLSearchParams && new URLSearchParams(document.location.search.substring(1));
|
||||||
var url = params && params.get("url") && decodeURIComponent(params.get("url"));
|
var url = params && params.get("url") && decodeURIComponent(params.get("url"));
|
||||||
var currentCfi = (params && params.get("cfi")) ? params.get("cfi") : undefined;
|
var currentCfi = (params && params.get("cfi")) ? params.get("cfi") : undefined;
|
||||||
var currentSectionIndex = (params && params.get("loc")) ? parseInt(params.get("loc")) : 6;
|
var currentSectionIndex = (params && params.get("loc")) ? parseInt(params.get("loc")) : undefined;
|
||||||
|
|
||||||
// Load the opf
|
// Load the opf
|
||||||
var book = ePub(url || "https://s3.amazonaws.com/moby-dick/");
|
var book = ePub(url || "https://s3.amazonaws.com/moby-dick/");
|
||||||
|
|
|
@ -808,7 +808,7 @@ class Rendition {
|
||||||
|
|
||||||
handleLinks(contents) {
|
handleLinks(contents) {
|
||||||
if (contents) {
|
if (contents) {
|
||||||
contents.on("link", (href) => {
|
contents.on("linkClicked", (href) => {
|
||||||
let relative = this.book.path.relative(href);
|
let relative = this.book.path.relative(href);
|
||||||
this.display(relative);
|
this.display(relative);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue