From 32dad756e13898928fdd341c2b4c10c5802c46c6 Mon Sep 17 00:00:00 2001 From: Alexander Dickson Date: Wed, 20 Mar 2013 16:43:13 +1100 Subject: [PATCH 1/2] Fixed typo in error thrown --- scripts/uncompressed/history.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/uncompressed/history.js b/scripts/uncompressed/history.js index 0e7cb1ec..97e5468c 100644 --- a/scripts/uncompressed/history.js +++ b/scripts/uncompressed/history.js @@ -1700,7 +1700,7 @@ // Check the State if ( History.getHashByUrl(url) && History.emulated.pushState ) { - throw new Error('History.js does not support states with fragement-identifiers (hashes/anchors).'); + throw new Error('History.js does not support states with fragment-identifiers (hashes/anchors).'); } // Handle Queueing From b78af84fc2b6b5da573e5ee0bd72f4213e36bb18 Mon Sep 17 00:00:00 2001 From: Christanto Leonardo Date: Sat, 11 May 2013 21:38:34 +0200 Subject: [PATCH 2/2] Issue #273 Tumblr and Facebook started adding #somevalue.01 to their shared URLS. jquery.history is rewriting these urls. --- scripts/uncompressed/history.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) mode change 100644 => 100755 scripts/uncompressed/history.js diff --git a/scripts/uncompressed/history.js b/scripts/uncompressed/history.js old mode 100644 new mode 100755 index 97e5468c..c5473b21 --- a/scripts/uncompressed/history.js +++ b/scripts/uncompressed/history.js @@ -122,6 +122,12 @@ * What is the title of the initial state */ History.options.initialTitle = History.options.initialTitle || document.title; + + /** + * History.options.transformHash + * If true will transform the HTML4 hash to HTML5 equivalence. Set to false if you want the hash to be just a plain string, no meaning whatsoever. + */ + History.options.transformHash = History.options.transformHash || true; // ==================================================================== @@ -1618,7 +1624,7 @@ if ( currentHash ) { // Expand Hash currentState = History.extractState(currentHash||document.location.href,true); - if ( currentState ) { + if ( History.options.transformHash && currentState ) { // We were able to parse it, it must be a State! // Let's forward to replaceState //History.debug('History.onPopState: state anchor', currentHash, currentState);