diff --git a/.DS_Store b/.DS_Store index 37b43e7..e1f729b 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/fpjs/reader/app.js b/fpjs/reader/app.js index d0a39fc..1024d19 100644 --- a/fpjs/reader/app.js +++ b/fpjs/reader/app.js @@ -222,7 +222,7 @@ FPR.app.init = (function($){ }); function showSidebar(){ - $book.css("pointer-events", "none"); //-- Avoid capture by ifrmae + //$book.css("pointer-events", "none"); //-- Avoid capture by ifrmae $sidebar.addClass("open"); $main.addClass("closed"); $icon.attr("src", "img/close.png"); @@ -241,9 +241,9 @@ FPR.app.init = (function($){ }else{ showSidebar(); - $open.clickOutside(function(){ - hideSidebar(); - }); + // $open.clickOutside(function(){ + // hideSidebar(); + // }); } }); diff --git a/fpjs/render/book.js b/fpjs/render/book.js index d9a11f0..97c3767 100644 --- a/fpjs/render/book.js +++ b/fpjs/render/book.js @@ -468,7 +468,6 @@ FP.Book.prototype.startDisplay = function(chapter){ var routed, prevChapter = this.spinePos, loaded = function(chapter){ - //-- If there is a saved page, and the pages haven't changed go to it if( this.prevChapterPos && prevChapter == chapter.pos @@ -487,7 +486,7 @@ FP.Book.prototype.startDisplay = function(chapter){ //-- Go to hashed page if present if(this.useHash){ - routed = this.route(loaded); + routed = this.route(false, loaded); } if(!this.useHash || !routed){ @@ -655,7 +654,7 @@ FP.Book.prototype.determineStorageMethod = function(override) { FP.storage.storageMethod(method); } -FP.Book.prototype.route = function(callback){ +FP.Book.prototype.route = function(hash, callback){ var location = window.location.hash.replace('#/', ''); if(this.useHash && location.length && location != this.prevLocation){ this.show(location, callback); diff --git a/fpjs/render/chapter.js b/fpjs/render/chapter.js index 1583f32..223d220 100644 --- a/fpjs/render/chapter.js +++ b/fpjs/render/chapter.js @@ -207,15 +207,21 @@ FP.Chapter.prototype.replaceLinks = function(callback){ relative = href.search("://"), fragment = href[0] == "#"; - if(relative != -1) return; //-- Only replace relative links - - link.onclick = function(){ - if(that.book.useHash){ - window.location.hash = "#/"+href; - }else{ - that.book.show(href); + if(relative != -1){ + + link.setAttribute("target", "_blank"); + + }else{ + + link.onclick = function(){ + if(that.book.useHash){ + window.location.hash = "#/"+href; + }else{ + that.book.show(href); + } } - } + } + }); diff --git a/index.html b/index.html index b6b2fa8..1e22fc3 100755 --- a/index.html +++ b/index.html @@ -18,7 +18,7 @@ "use strict"; var FP = FP || {}; - FP.VERSION = "0.1.3"; + FP.VERSION = "0.1.4"; document.onreadystatechange = function () { if (document.readyState == "complete") {