mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
added dist version and dev.html for development
This commit is contained in:
parent
d19d0f068c
commit
684a9645ae
12 changed files with 63 additions and 525 deletions
BIN
.DS_Store
vendored
BIN
.DS_Store
vendored
Binary file not shown.
BIN
fpjs/.DS_Store
vendored
BIN
fpjs/.DS_Store
vendored
Binary file not shown.
197
fpjs/old/app.js
197
fpjs/old/app.js
|
@ -1,197 +0,0 @@
|
||||||
FP.namespace('app').init = (function($){
|
|
||||||
|
|
||||||
|
|
||||||
function init(){
|
|
||||||
var fileInput = document.getElementById("file-input");
|
|
||||||
var area = document.getElementById("area");
|
|
||||||
var bookFiles = [],
|
|
||||||
bookImages = [],
|
|
||||||
bookCSS = [];
|
|
||||||
|
|
||||||
var pages = {},
|
|
||||||
images = {},
|
|
||||||
ordered = [];
|
|
||||||
|
|
||||||
//-- Tell zip where it is located
|
|
||||||
zip.workerScriptsPath = "js/libs/";
|
|
||||||
|
|
||||||
//-- Listen for the Input Change
|
|
||||||
fileInput.addEventListener('change', function(){
|
|
||||||
//-- Grab first file
|
|
||||||
var file = fileInput.files[0];
|
|
||||||
|
|
||||||
//-- Get all Entries in Zip file
|
|
||||||
FP.core.loadZip.getEntries(file, function(entries) {
|
|
||||||
//TODO: parse the rootfile to find files
|
|
||||||
var total = 0,
|
|
||||||
loaded = 0;
|
|
||||||
|
|
||||||
var total_img = 0,
|
|
||||||
loaded_img = 0;
|
|
||||||
|
|
||||||
//-- Split Entries into xhtml, images, css
|
|
||||||
entries.forEach(function(entry) {
|
|
||||||
|
|
||||||
if(entry.filename.search(".xhtml") != -1 ||
|
|
||||||
entry.filename.search(".html") != -1 ||
|
|
||||||
entry.filename.search(".htm") != -1){
|
|
||||||
//console.log("entry", entry);
|
|
||||||
bookFiles.push(entry);
|
|
||||||
total++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(entry.filename.search(".jpg") != -1 || entry.filename.search(".png") != -1){
|
|
||||||
bookImages.push(entry);
|
|
||||||
total_img++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(entry.filename.search(".css") != -1){
|
|
||||||
bookCSS.push(entry);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
bookImages.forEach(function(file) {
|
|
||||||
var name = file.filename.replace("OPS/", '').replace("OEBPS/", '');
|
|
||||||
//console.log("name", name)
|
|
||||||
//Blob or File
|
|
||||||
FP.core.loadZip.getEntryFile(file, "Blob", function(blobURL, revokeBlobURL) {
|
|
||||||
|
|
||||||
images[name] = blobURL;
|
|
||||||
|
|
||||||
//console.log("images[name]", images[name])
|
|
||||||
//var img = document.createElement('img');
|
|
||||||
//img.src = blobURL;
|
|
||||||
//area.appendChild(img);
|
|
||||||
|
|
||||||
loaded_img++;
|
|
||||||
if(loaded_img == total_img){
|
|
||||||
imgReady();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}, function(current, total) {
|
|
||||||
//-- Progress Meter
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
bookFiles.forEach(function(file) {
|
|
||||||
var reg = /\/(.*)\./,
|
|
||||||
name = reg.exec(file.filename)[1];
|
|
||||||
|
|
||||||
//TEMP ORDER FIX
|
|
||||||
if(name === "cover") name = "1_"+name;
|
|
||||||
if(name === "TOC") name = "2_"+name;
|
|
||||||
|
|
||||||
//Blob or File
|
|
||||||
FP.core.loadZip.getEntryFile(file, "Blob", function(blobURL, revokeBlobURL) {
|
|
||||||
//console.log(file, blobURL)
|
|
||||||
|
|
||||||
// $.ajax({
|
|
||||||
// url: blobURL,
|
|
||||||
// success: function(data) {
|
|
||||||
// pages.push(data);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: blobURL,
|
|
||||||
dataType: "html",
|
|
||||||
cache: true,
|
|
||||||
success: function(data) {
|
|
||||||
//var section = $("<section>");
|
|
||||||
//$('#area').append(section);
|
|
||||||
pages[name] = data;
|
|
||||||
ordered.push(name);
|
|
||||||
loaded++;
|
|
||||||
if(loaded == total){
|
|
||||||
allReady();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function(e){
|
|
||||||
console.log("error:", e)
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
//var section = $("<section>");
|
|
||||||
//section.load(blobURL);
|
|
||||||
//$('#area').append(section);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// var iframe = document.createElement('iframe');
|
|
||||||
// iframe.src = window.webkitURL.createObjectURL(blobURL);
|
|
||||||
// iframe.type = "content";
|
|
||||||
// area.appendChild(iframe);
|
|
||||||
|
|
||||||
// FP.core.load(blobURL, function(data){
|
|
||||||
// //console.log("data", data);
|
|
||||||
// var iframe = document.createElement('iframe');
|
|
||||||
// iframe.src = blobURL;
|
|
||||||
// iframe.type = "content";
|
|
||||||
// area.appendChild(iframe);
|
|
||||||
// });
|
|
||||||
|
|
||||||
// var reader = new FileReader();
|
|
||||||
// reader.onloadend = function() {
|
|
||||||
// if (this.result) {
|
|
||||||
// console.log(this.result)
|
|
||||||
// }
|
|
||||||
// else if ( errorCallback ) {
|
|
||||||
// console.log("ERROR")
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
// reader.readAsText(file);
|
|
||||||
|
|
||||||
}, function(current, total) {
|
|
||||||
//-- Progress Meter
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function allReady(){
|
|
||||||
|
|
||||||
|
|
||||||
FP.book.page.start($("#area"), pages, ordered);
|
|
||||||
|
|
||||||
$("#modal").fadeOut();
|
|
||||||
|
|
||||||
$("#next").fadeIn();
|
|
||||||
$("#prev").fadeIn();
|
|
||||||
|
|
||||||
$("#next").on("click", function(){
|
|
||||||
FP.book.page.next();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#prev").on("click", function(){
|
|
||||||
FP.book.page.prev();
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).keydown(function(e) {
|
|
||||||
if(e.keyCode == 37) { // left
|
|
||||||
FP.book.page.prev();
|
|
||||||
}
|
|
||||||
else if(e.keyCode == 39) { // right
|
|
||||||
FP.book.page.next();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function imgReady(){
|
|
||||||
FP.book.page.setImages(images);
|
|
||||||
}
|
|
||||||
//console.log(bookFiles, bookImages, bookCSS)
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return init;
|
|
||||||
|
|
||||||
})(jQuery);
|
|
147
fpjs/old/core.js
147
fpjs/old/core.js
|
@ -1,147 +0,0 @@
|
||||||
FP.namespace('core').load = (function(){
|
|
||||||
function load(url, callback){
|
|
||||||
var xhr = new XMLHttpRequest();
|
|
||||||
xhr.open('GET', url, true);
|
|
||||||
xhr.responseType = 'blob';
|
|
||||||
|
|
||||||
xhr.onload = function(e) {
|
|
||||||
if (this.status == 200) {
|
|
||||||
// Note: .response instead of .responseText
|
|
||||||
var blob = new Blob([this.response], {type: 'application/xhtml+xml'});
|
|
||||||
callback(blob);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
xhr.send();
|
|
||||||
}
|
|
||||||
return load;
|
|
||||||
})();
|
|
||||||
|
|
||||||
FP.namespace('core').load2 = (function(){
|
|
||||||
|
|
||||||
/*
|
|
||||||
PDFJS.getPdf(
|
|
||||||
{
|
|
||||||
url: "http://google.com",
|
|
||||||
progress: function getPDFProgress(evt) {
|
|
||||||
handler.send('DocProgress', {
|
|
||||||
loaded: evt.loaded,
|
|
||||||
total: evt.lengthComputable ? evt.total : void(0)
|
|
||||||
});
|
|
||||||
},
|
|
||||||
error: function getPDFError(e) {
|
|
||||||
console.log('DocError', 'Unexpected server response of ' +
|
|
||||||
e.target.status + '.');
|
|
||||||
},
|
|
||||||
headers: source.httpHeaders
|
|
||||||
},
|
|
||||||
function(data) {
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
||||||
function load(arg, callback){
|
|
||||||
var params = arg;
|
|
||||||
if (typeof arg === 'string'){
|
|
||||||
params = { url: arg };
|
|
||||||
}
|
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
|
||||||
|
|
||||||
xhr.open('GET', params.url);
|
|
||||||
|
|
||||||
var headers = params.headers;
|
|
||||||
if (headers) {
|
|
||||||
for (var property in headers) {
|
|
||||||
if (typeof headers[property] === 'undefined')
|
|
||||||
continue;
|
|
||||||
|
|
||||||
xhr.setRequestHeader(property, params.headers[property]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
xhr.mozResponseType = xhr.responseType = 'arraybuffer';
|
|
||||||
|
|
||||||
var protocol = params.url.substring(0, params.url.indexOf(':') + 1);
|
|
||||||
xhr.expected = (protocol === 'http:' || protocol === 'https:') ? 200 : 0;
|
|
||||||
|
|
||||||
if ('progress' in params)
|
|
||||||
xhr.onprogress = params.progress || undefined;
|
|
||||||
|
|
||||||
var calledErrorBack = false;
|
|
||||||
|
|
||||||
if ('error' in params) {
|
|
||||||
xhr.onerror = function errorBack() {
|
|
||||||
if (!calledErrorBack) {
|
|
||||||
calledErrorBack = true;
|
|
||||||
params.error();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
xhr.onreadystatechange = function getPdfOnreadystatechange(e) {
|
|
||||||
if (xhr.readyState === 4) {
|
|
||||||
if (xhr.status === xhr.expected) {
|
|
||||||
var data = (xhr.mozResponseArrayBuffer || xhr.mozResponse ||
|
|
||||||
xhr.responseArrayBuffer || xhr.response);
|
|
||||||
callback(data);
|
|
||||||
} else if (params.error && !calledErrorBack) {
|
|
||||||
calledErrorBack = true;
|
|
||||||
params.error(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
xhr.send(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
return load;
|
|
||||||
|
|
||||||
})();
|
|
||||||
|
|
||||||
FP.namespace("core").loadZip = (function(){
|
|
||||||
var URL = webkitURL || mozURL || URL;
|
|
||||||
|
|
||||||
function getEntries(file, onend) {
|
|
||||||
//console.log("file", file)
|
|
||||||
// FP.utils.createTempFile(function(temp){
|
|
||||||
// console.log("temp", temp)
|
|
||||||
// });
|
|
||||||
zip.createReader(new zip.BlobReader(file), function(zipReader) {
|
|
||||||
zipReader.getEntries(onend);
|
|
||||||
}, function(error){ console.log("Error:", error) });
|
|
||||||
}
|
|
||||||
|
|
||||||
function getEntryFile(entry, creationMethod, onend, onprogress) {
|
|
||||||
var writer, zipFileEntry;
|
|
||||||
|
|
||||||
function getData() {
|
|
||||||
entry.getData(writer, function(blob) {
|
|
||||||
var blobURL = creationMethod == "Blob" ? URL.createObjectURL(blob) : zipFileEntry.toURL();
|
|
||||||
onend(blobURL, function() {
|
|
||||||
if (creationMethod == "Blob")
|
|
||||||
URL.revokeObjectURL(blobURL);
|
|
||||||
});
|
|
||||||
}, onprogress);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (creationMethod == "Blob") {
|
|
||||||
writer = new zip.BlobWriter();
|
|
||||||
getData();
|
|
||||||
} else {
|
|
||||||
FP.utils.createTempFile(function(fileEntry) {
|
|
||||||
zipFileEntry = fileEntry;
|
|
||||||
writer = new zip.FileWriter(zipFileEntry);
|
|
||||||
getData();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return {
|
|
||||||
"getEntries" : getEntries,
|
|
||||||
"getEntryFile" : getEntryFile
|
|
||||||
}
|
|
||||||
|
|
||||||
})();
|
|
|
@ -1,71 +0,0 @@
|
||||||
FP.namespace('book').page = (function($){
|
|
||||||
var _bookPages,
|
|
||||||
_ordered,
|
|
||||||
_$el,
|
|
||||||
_currentPage = 0,
|
|
||||||
_images;
|
|
||||||
|
|
||||||
function start($el, pages, order){
|
|
||||||
_$el = $el;
|
|
||||||
_bookPages = pages;
|
|
||||||
_ordered = order;
|
|
||||||
|
|
||||||
_ordered.sort(function(a, b) {
|
|
||||||
var textA = a.toUpperCase();
|
|
||||||
var textB = b.toUpperCase();
|
|
||||||
return (textA < textB) ? -1 : (textA > textB) ? 1 : 0;
|
|
||||||
});
|
|
||||||
|
|
||||||
loadIn(0)
|
|
||||||
}
|
|
||||||
|
|
||||||
function loadIn(pageNum){
|
|
||||||
var page;
|
|
||||||
|
|
||||||
_currentPage = pageNum;
|
|
||||||
page = _bookPages[_ordered[_currentPage]];
|
|
||||||
|
|
||||||
_$el.html(page);
|
|
||||||
|
|
||||||
if(_images){
|
|
||||||
scanImages();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function next(){
|
|
||||||
if(_currentPage <= _ordered.length){
|
|
||||||
loadIn(_currentPage+1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function prev(){
|
|
||||||
if(_currentPage > 0){
|
|
||||||
loadIn(_currentPage-1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function setImages(images){
|
|
||||||
_images = images;
|
|
||||||
//scanImages();
|
|
||||||
}
|
|
||||||
|
|
||||||
function scanImages(){
|
|
||||||
_$el.find("img").each(function(){
|
|
||||||
var $this = $(this),
|
|
||||||
src = $this.attr("src");
|
|
||||||
|
|
||||||
$this.attr("src", _images[src]);
|
|
||||||
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
"start" : start,
|
|
||||||
"loadIn" : loadIn,
|
|
||||||
"prev" : prev,
|
|
||||||
"next" : next,
|
|
||||||
"setImages": setImages
|
|
||||||
};
|
|
||||||
})(jQuery);
|
|
|
@ -1,23 +0,0 @@
|
||||||
FP.namespace("utils").createTempFile = (function(){
|
|
||||||
var requestFileSystem = webkitRequestFileSystem || mozRequestFileSystem || requestFileSystem;
|
|
||||||
|
|
||||||
function createTempFile(callback) {
|
|
||||||
var tmpFilename = "tmp.dat";
|
|
||||||
requestFileSystem(TEMPORARY, 4 * 1024 * 1024 * 1024, function(filesystem) {
|
|
||||||
function create() {
|
|
||||||
filesystem.root.getFile(tmpFilename, {
|
|
||||||
create : true
|
|
||||||
}, function(zipFile) {
|
|
||||||
callback(zipFile);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
filesystem.root.getFile(tmpFilename, null, function(entry) {
|
|
||||||
entry.remove(create, create);
|
|
||||||
}, create);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return createTempFile
|
|
||||||
|
|
||||||
})();
|
|
|
@ -2,7 +2,7 @@ FP.store = FP.store || {};
|
||||||
|
|
||||||
FP.store.filesystem = function() {
|
FP.store.filesystem = function() {
|
||||||
var _urls = {},
|
var _urls = {},
|
||||||
_queue = new FP.Queue("fpjs/render/loader_filesystem.js", 6),
|
_queue = new FP.Queue("fpjs/render/workers/loader_filesystem.js", 6),
|
||||||
_requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem,
|
_requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem,
|
||||||
_fs;
|
_fs;
|
||||||
|
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
FP.Hooks.register("beforeChapterDisplay").transculsions = function(callback, chapter){
|
|
||||||
|
|
||||||
var trans = chapter.doc.querySelectorAll('[transclusion]'),
|
|
||||||
items = Array.prototype.slice.call(trans);;
|
|
||||||
|
|
||||||
items.forEach(function(item){
|
|
||||||
var src = item.getAttribute("ref"),
|
|
||||||
iframe = document.createElement('iframe'),
|
|
||||||
orginal_width = item.getAttribute("width"),
|
|
||||||
orginal_height = item.getAttribute("height"),
|
|
||||||
parent = item.parentNode,
|
|
||||||
width = orginal_width,
|
|
||||||
height = orginal_height,
|
|
||||||
ratio;
|
|
||||||
|
|
||||||
|
|
||||||
function size() {
|
|
||||||
width = orginal_width;
|
|
||||||
height = orginal_height;
|
|
||||||
|
|
||||||
if(width > chapter.colWidth){
|
|
||||||
ratio = chapter.colWidth / width;
|
|
||||||
|
|
||||||
width = chapter.colWidth;
|
|
||||||
height = height * ratio;
|
|
||||||
}
|
|
||||||
|
|
||||||
iframe.width = width;
|
|
||||||
iframe.height = height;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
size();
|
|
||||||
|
|
||||||
//-- resize event
|
|
||||||
|
|
||||||
|
|
||||||
chapter.book.listenUntil("book:resized", "book:chapterDestroy", size);
|
|
||||||
|
|
||||||
iframe.src = src;
|
|
||||||
|
|
||||||
//<iframe width="560" height="315" src="http://www.youtube.com/embed/DUL6MBVKVLI" frameborder="0" allowfullscreen="true"></iframe>
|
|
||||||
parent.replaceChild(iframe, item);
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(callback) callback();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
FP.Unarchiver = function(url, callback){
|
FP.Unarchiver = function(url, callback){
|
||||||
this.libPath = "fpjs/libs/";
|
this.libPath = (this.fpjsPath || "fpjs/" ) + "/libs/";
|
||||||
this.zipUrl = url;
|
this.zipUrl = url;
|
||||||
this.callback = callback;
|
this.callback = callback;
|
||||||
this.loadLib(function(){
|
this.loadLib(function(){
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
importScripts('core.js');
|
|
||||||
|
|
||||||
var _requestFileSystem = self.requestFileSystem || self.webkitRequestFileSystem;
|
var _requestFileSystem = self.requestFileSystem || self.webkitRequestFileSystem;
|
||||||
|
|
||||||
const DBSIZE = 5*1024*1024;
|
const DBSIZE = 5*1024*1024;
|
||||||
|
@ -34,7 +32,7 @@ self.openFs = function(callback){
|
||||||
}
|
}
|
||||||
|
|
||||||
self.request = function(path, callback) {
|
self.request = function(path, callback) {
|
||||||
var xhr = new FP.core.loadFile(path);
|
var xhr = new self.loadFile(path);
|
||||||
|
|
||||||
xhr.succeeded = function(file) {
|
xhr.succeeded = function(file) {
|
||||||
if(callback) callback(file);
|
if(callback) callback(file);
|
||||||
|
@ -114,4 +112,45 @@ self.errorHandler = function(e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.loadFile = function(url, callback){
|
||||||
|
var xhr = new XMLHttpRequest();
|
||||||
|
|
||||||
|
this.succeeded = function(response){
|
||||||
|
if(callback){
|
||||||
|
callback(response);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.failed = function(err){
|
||||||
|
console.log("Error:", err);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.start = function(){
|
||||||
|
var that = this;
|
||||||
|
|
||||||
|
xhr.open('GET', url, true);
|
||||||
|
xhr.responseType = 'blob';
|
||||||
|
|
||||||
|
xhr.onload = function(e) {
|
||||||
|
if (this.status == 200) {
|
||||||
|
that.succeeded(this.response);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
xhr.onerror = function(e) {
|
||||||
|
that.failed(this.status); //-- TODO: better error message
|
||||||
|
};
|
||||||
|
|
||||||
|
xhr.send();
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
"start": this.start,
|
||||||
|
"succeeded" : this.succeeded,
|
||||||
|
"failed" : this.failed
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
self.openFs();
|
self.openFs();
|
||||||
|
|
||||||
|
|
||||||
|
|
14
grunt.js
14
grunt.js
|
@ -8,13 +8,19 @@ module.exports = function(grunt) {
|
||||||
'<%= grunt.template.today("yyyy-mm-dd") %> */'
|
'<%= grunt.template.today("yyyy-mm-dd") %> */'
|
||||||
},
|
},
|
||||||
min: {
|
min: {
|
||||||
dist: {
|
'dist/render.min.js': ['<banner>', 'fpjs/render/*.js'],
|
||||||
src: ['<banner>', 'fpjs/render/*.js'],
|
'dist/workers/loader_filesystem.js': ['<banner>', 'fpjs/render/workers/loader_filesystem.js'],
|
||||||
dest: 'dist/built.min.js'
|
'dist/reader.min.js': ['<banner>', 'fpjs/reader/*.js'],
|
||||||
}
|
'dist/hooks/transculsions.min.js': ['<banner>', 'fpjs/hooks/transculsions.js'],
|
||||||
|
'dist/libs/zip.js': ['fpjs/libs/zip.js'],
|
||||||
|
'dist/libs/deflate.js': ['fpjs/libs/deflate.js'],
|
||||||
|
'dist/libs/inflate.js': ['fpjs/libs/inflate.js'],
|
||||||
|
'dist/libs/mime-types.js': ['fpjs/libs/mime-types.js']
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Default task(s).
|
// Default task(s).
|
||||||
grunt.registerTask('default', ['min']);
|
grunt.registerTask('default', ['min']);
|
||||||
|
|
||||||
|
|
31
index.html
31
index.html
|
@ -10,44 +10,29 @@
|
||||||
|
|
||||||
<link rel="stylesheet" href="css/normalize.css">
|
<link rel="stylesheet" href="css/normalize.css">
|
||||||
<link rel="stylesheet" href="css/main.css">
|
<link rel="stylesheet" href="css/main.css">
|
||||||
<!-- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> -->
|
|
||||||
<script src="fpjs/libs/jquery-1.9.0.js"></script>
|
<script src="dist/libs/jquery-1.9.0.min.js"></script>
|
||||||
<script>window.jQuery || document.write('<script src="fpjs/libs/jquery-1.9.0.min.js"><\/script>')</script>
|
<script src="dist/libs/modernizr-2.6.2.min.js"></script>
|
||||||
<script src="fpjs/libs/modernizr-2.6.2.min.js"></script>
|
|
||||||
<script>
|
<script>
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
document.onreadystatechange = function () {
|
document.onreadystatechange = function () {
|
||||||
if (document.readyState == "complete") {
|
if (document.readyState == "complete") {
|
||||||
|
FPR.fpjsPath = "dist/"
|
||||||
FPR.app.init();
|
FPR.app.init();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!--<script async src="fpjs/libs/jquery.touchy.min.js"></script>-->
|
|
||||||
|
|
||||||
<!-- Render -->
|
<!-- Render -->
|
||||||
<script src="fpjs/render/base.js"></script>
|
<script src="dist/render.min.js"></script>
|
||||||
<script src="fpjs/render/core.js"></script>
|
|
||||||
<script src="fpjs/render/queue.js"></script>
|
|
||||||
<script src="fpjs/render/unarchiver.js"></script>
|
|
||||||
<script src="fpjs/render/storage.js"></script>
|
|
||||||
<script src="fpjs/render/storage_ram.js"></script>
|
|
||||||
<script src="fpjs/render/storage_websql.js"></script>
|
|
||||||
<script src="fpjs/render/storage_indexeddb.js"></script>
|
|
||||||
<script src="fpjs/render/storage_filesystem.js"></script>
|
|
||||||
<script src="fpjs/render/events.js"></script>
|
|
||||||
<script src="fpjs/render/hooks.js"></script>
|
|
||||||
<script src="fpjs/render/book.js"></script>
|
|
||||||
<script src="fpjs/render/chapter.js"></script>
|
|
||||||
|
|
||||||
<!-- Plugins -->
|
<!-- Hooks -->
|
||||||
<script async src="fpjs/render/transculsions.js"></script>
|
<script async src="dist/hooks/transculsions.min.js"></script>
|
||||||
|
|
||||||
<!-- Reader -->
|
<!-- Reader -->
|
||||||
<script async src="fpjs/reader/utils.js"></script>
|
<script src="dist/reader.min.js"></script>
|
||||||
<script async src="fpjs/reader/app.js"></script>
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue