history.js
history.js copied to clipboard
Add back/forward button to the new state
This change makes it possible to check if the statechange event is caused by the browser back & forward buttons. And can later be checked via the navigation variable:
var State = History.getState(); if(State.navigation) { // Back / forward button pressed }