mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
remove any uses of offsetLeft, cleaned up storage
This commit is contained in:
parent
7f41f00775
commit
5d7a15eabd
14 changed files with 102 additions and 72 deletions
|
@ -39,8 +39,10 @@ FP.Book = function(elem, bookPath){
|
|||
this.listeners();
|
||||
|
||||
//-- Determine storage method
|
||||
//-- Override options: none | ram | websql | indexedDB | filesystem
|
||||
this.determineStorageMethod();
|
||||
//-- Override options: none | ram | websqldatabase | indexeddb | filesystem
|
||||
//FP.storageOverride = "none"
|
||||
|
||||
FP.storage.determineStorageMethod(FP.storageOverride);
|
||||
|
||||
// BookUrl is optional, but if present start loading process
|
||||
if(bookPath) {
|
||||
|
@ -682,20 +684,6 @@ FP.Book.prototype.fromStorage = function(stored) {
|
|||
|
||||
}
|
||||
|
||||
FP.Book.prototype.determineStorageMethod = function(override) {
|
||||
var method = 'ram';
|
||||
|
||||
if(override){
|
||||
method = override;
|
||||
}else{
|
||||
if (Modernizr.websqldatabase) { method = "websql" }
|
||||
if (Modernizr.indexeddb) { method = "indexedDB" }
|
||||
if (Modernizr.filesystem) { method = "filesystem" }
|
||||
}
|
||||
|
||||
FP.storage.storageMethod(method);
|
||||
}
|
||||
|
||||
FP.Book.prototype.route = function(hash, callback){
|
||||
var location = window.location.hash.replace('#/', '');
|
||||
if(this.useHash && location.length && location != this.prevLocation){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue