Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions scripts/uncompressed/history.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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;


// ====================================================================
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down