mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-05 15:32:55 +02:00
Support nav item with muliple properties, fixes #124
This commit is contained in:
parent
e9ebec3f64
commit
eca5ffbeff
9 changed files with 21 additions and 13 deletions
File diff suppressed because one or more lines are too long
6
reader/js/epub.min.js
vendored
6
reader/js/epub.min.js
vendored
|
@ -5352,12 +5352,14 @@ EPUBJS.Parser.prototype.packageContents = function(packageXml, baseUrl){
|
|||
|
||||
//-- Find TOC NAV
|
||||
EPUBJS.Parser.prototype.findNavPath = function(manifestNode){
|
||||
var node = manifestNode.querySelector("item[properties^='nav']");
|
||||
// Find item with property 'nav'
|
||||
// Should catch nav irregardless of order
|
||||
var node = manifestNode.querySelector("item[properties$='nav'], item[properties^='nav '], item[properties*=' nav ']");
|
||||
return node ? node.getAttribute('href') : false;
|
||||
};
|
||||
|
||||
//-- Find TOC NCX: media-type="application/x-dtbncx+xml" href="toc.ncx"
|
||||
EPUBJS.Parser.prototype.findTocPath = function(manifestNode){
|
||||
EPUBJS.Parser.prototype.findTocPath = function(manifestNode, spineNode){
|
||||
var node = manifestNode.querySelector("item[media-type='application/x-dtbncx+xml']");
|
||||
var tocId;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue