From 82d24fd8f0996f6d34a26d6aeb35d00df925ca72 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 5 Feb 2013 21:32:27 +0400 Subject: [PATCH] minor #URL related changes... Signed-off-by: Alex A. Naanou --- magazine.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/magazine.js b/magazine.js index 01993d5..575ca38 100755 --- a/magazine.js +++ b/magazine.js @@ -692,7 +692,7 @@ function loadURLState(){ if(!UPDATE_HASH_URL_POSITION){ // push current position... // NOTE: this will enable partial history navigation, but only - // on actions envolving actual links... + // on actions envolving actual links... window.history.pushState(null, null, '#' + getPageNumber()) } return n @@ -729,7 +729,11 @@ function saveURLState(){ // clear the url if it does not match the current page... } else { - if(n != parseInt(anchor)){ + if(n != parseInt(anchor) + // do not remove linked pages... + // XXX this does not work when navigating from a different page... + || (elem.hasClass('page') && n != getPageNumber(elem)) + || n != getPageNumber(elem).parents('.page')){ window.location.hash = '' } }