mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
Merged v2 with Master
This commit is contained in:
commit
7ae706e661
13 changed files with 33 additions and 21 deletions
|
@ -5,7 +5,7 @@ Epub.js
|
|||
|
||||
Epub.js is a JavaScript library for rendering ePub documents in the browser, across many devices.
|
||||
|
||||
Epub.js provides an interface for common ebook functions (such as rendering, persistence and pagination) without the need to develop a dedicated application or plugin.
|
||||
Epub.js provides an interface for common ebook functions (such as rendering, persistence and pagination) without the need to develop a dedicated application or plugin. Importantly, it has an incredibly permissive [Free BSD](http://en.wikipedia.org/wiki/BSD_licenses) license.
|
||||
|
||||
[Try it while reading Moby Dick](http://futurepress.github.com/epub.js/reader/)
|
||||
|
||||
|
|
|
@ -4295,13 +4295,13 @@ EPUBJS.Parser.prototype.packageContents = function(packageXml, baseUrl){
|
|||
}
|
||||
|
||||
manifestNode = packageXml.querySelector("manifest");
|
||||
if(!metadataNode) {
|
||||
if(!manifestNode) {
|
||||
console.error("No Manifest Found");
|
||||
return;
|
||||
}
|
||||
|
||||
spineNode = packageXml.querySelector("spine");
|
||||
if(!metadataNode) {
|
||||
if(!spineNode) {
|
||||
console.error("No Spine Found");
|
||||
return;
|
||||
}
|
||||
|
@ -5800,7 +5800,10 @@ EPUBJS.Unarchiver.prototype.getText = function(url, encoding){
|
|||
var entry = this.zipFs.find(decodededUrl);
|
||||
var _URL = window.URL || window.webkitURL || window.mozURL;
|
||||
|
||||
if(!entry) console.error("No entry found", url);
|
||||
if(!entry) {
|
||||
console.warn("File not found in the contained epub:", url);
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
entry.getText(function(text){
|
||||
deferred.resolve(text);
|
||||
|
|
File diff suppressed because one or more lines are too long
4
build/epub.min.js
vendored
4
build/epub.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -4294,13 +4294,13 @@ EPUBJS.Parser.prototype.packageContents = function(packageXml, baseUrl){
|
|||
}
|
||||
|
||||
manifestNode = packageXml.querySelector("manifest");
|
||||
if(!metadataNode) {
|
||||
if(!manifestNode) {
|
||||
console.error("No Manifest Found");
|
||||
return;
|
||||
}
|
||||
|
||||
spineNode = packageXml.querySelector("spine");
|
||||
if(!metadataNode) {
|
||||
if(!spineNode) {
|
||||
console.error("No Spine Found");
|
||||
return;
|
||||
}
|
||||
|
@ -5799,7 +5799,10 @@ EPUBJS.Unarchiver.prototype.getText = function(url, encoding){
|
|||
var entry = this.zipFs.find(decodededUrl);
|
||||
var _URL = window.URL || window.webkitURL || window.mozURL;
|
||||
|
||||
if(!entry) console.error("No entry found", url);
|
||||
if(!entry) {
|
||||
console.warn("File not found in the contained epub:", url);
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
entry.getText(function(text){
|
||||
deferred.resolve(text);
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
9
reader/js/epub.min.js
vendored
9
reader/js/epub.min.js
vendored
|
@ -4295,13 +4295,13 @@ EPUBJS.Parser.prototype.packageContents = function(packageXml, baseUrl){
|
|||
}
|
||||
|
||||
manifestNode = packageXml.querySelector("manifest");
|
||||
if(!metadataNode) {
|
||||
if(!manifestNode) {
|
||||
console.error("No Manifest Found");
|
||||
return;
|
||||
}
|
||||
|
||||
spineNode = packageXml.querySelector("spine");
|
||||
if(!metadataNode) {
|
||||
if(!spineNode) {
|
||||
console.error("No Spine Found");
|
||||
return;
|
||||
}
|
||||
|
@ -5800,7 +5800,10 @@ EPUBJS.Unarchiver.prototype.getText = function(url, encoding){
|
|||
var entry = this.zipFs.find(decodededUrl);
|
||||
var _URL = window.URL || window.webkitURL || window.mozURL;
|
||||
|
||||
if(!entry) console.error("No entry found", url);
|
||||
if(!entry) {
|
||||
console.warn("File not found in the contained epub:", url);
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
entry.getText(function(text){
|
||||
deferred.resolve(text);
|
||||
|
|
2
reader/js/libs/inflate.min.js
vendored
2
reader/js/libs/inflate.min.js
vendored
File diff suppressed because one or more lines are too long
2
reader/js/libs/zip.min.js
vendored
2
reader/js/libs/zip.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -70,13 +70,13 @@ EPUBJS.Parser.prototype.packageContents = function(packageXml, baseUrl){
|
|||
}
|
||||
|
||||
manifestNode = packageXml.querySelector("manifest");
|
||||
if(!metadataNode) {
|
||||
if(!manifestNode) {
|
||||
console.error("No Manifest Found");
|
||||
return;
|
||||
}
|
||||
|
||||
spineNode = packageXml.querySelector("spine");
|
||||
if(!metadataNode) {
|
||||
if(!spineNode) {
|
||||
console.error("No Spine Found");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -83,7 +83,10 @@ EPUBJS.Unarchiver.prototype.getText = function(url, encoding){
|
|||
var entry = this.zipFs.find(decodededUrl);
|
||||
var _URL = window.URL || window.webkitURL || window.mozURL;
|
||||
|
||||
if(!entry) console.error("No entry found", url);
|
||||
if(!entry) {
|
||||
console.warn("File not found in the contained epub:", url);
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
entry.getText(function(text){
|
||||
deferred.resolve(text);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue