diff --git a/scripts/uncompressed/history.js b/scripts/uncompressed/history.js old mode 100644 new mode 100755 index 0e7cb1ec..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); @@ -1700,7 +1706,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