mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
Handle missing TOC
This commit is contained in:
parent
536629e8bb
commit
46633775d2
6 changed files with 11 additions and 7 deletions
|
@ -946,6 +946,8 @@ EPUBJS.Book.prototype.unpack = function(containerPath){
|
||||||
// book.saveSettings();
|
// book.saveSettings();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
book.ready.toc.resolve(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}).
|
}).
|
||||||
|
@ -2191,7 +2193,7 @@ EPUBJS.Parser.prototype.container = function(containerXml){
|
||||||
var rootfile = containerXml.querySelector("rootfile"),
|
var rootfile = containerXml.querySelector("rootfile"),
|
||||||
fullpath = rootfile.getAttribute('full-path'),
|
fullpath = rootfile.getAttribute('full-path'),
|
||||||
folder = EPUBJS.core.folder(fullpath);
|
folder = EPUBJS.core.folder(fullpath);
|
||||||
|
console.log("rootfile", containerXml.querySelectorAll("rootfile"));
|
||||||
//-- Now that we have the path we can parse the contents
|
//-- Now that we have the path we can parse the contents
|
||||||
return {
|
return {
|
||||||
'packagePath' : fullpath,
|
'packagePath' : fullpath,
|
||||||
|
|
4
build/epub.min.js
vendored
4
build/epub.min.js
vendored
File diff suppressed because one or more lines are too long
4
demo/js/epub.min.js
vendored
4
demo/js/epub.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -104,7 +104,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
// var Book = ePub("../demo/moby-dick/", {restore: true, reload: false });
|
// var Book = ePub("../demo/moby-dick/", {restore: true, reload: false });
|
||||||
var Book = ePub("", {restore: true, reload: false });
|
var Book = ePub("../books/demo-book-gh-pages/", {restore: true, reload: false });
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -211,6 +211,8 @@ EPUBJS.Book.prototype.unpack = function(containerPath){
|
||||||
// book.saveSettings();
|
// book.saveSettings();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
book.ready.toc.resolve(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}).
|
}).
|
||||||
|
|
|
@ -8,7 +8,7 @@ EPUBJS.Parser.prototype.container = function(containerXml){
|
||||||
var rootfile = containerXml.querySelector("rootfile"),
|
var rootfile = containerXml.querySelector("rootfile"),
|
||||||
fullpath = rootfile.getAttribute('full-path'),
|
fullpath = rootfile.getAttribute('full-path'),
|
||||||
folder = EPUBJS.core.folder(fullpath);
|
folder = EPUBJS.core.folder(fullpath);
|
||||||
|
console.log("rootfile", containerXml.querySelectorAll("rootfile"));
|
||||||
//-- Now that we have the path we can parse the contents
|
//-- Now that we have the path we can parse the contents
|
||||||
return {
|
return {
|
||||||
'packagePath' : fullpath,
|
'packagePath' : fullpath,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue