history.js
function scrollToAnchorId(hash) {
    var target = document.getElementById(hash = (hash || '').replace(/^#/, ''));
    if (target && target.id === hash && target.nodeName === "A") {
      var rect = target.getBoundingClientRect();
      global.scrollTo((documentElement.scrollLeft || 0), rect.top + (documentElement.scrollTop || 0)
        - (documentElement.clientTop || 0));
    }
  }
function scrollToAnchorId(hash) {
    var target = document.getElementById(hash = (hash || '').replace(/^#/, ''));
    if (target && target.id === hash && target.nodeName === "A") {
      var rect = target.getBoundingClientRect();
      global.scrollTo((documentElement.scrollLeft || 0), rect.top + (documentElement.scrollTop || 0)
        - (documentElement.clientTop || 0));
    }
  }
function scrollToAnchorId ( hash ) { var target = document . getElementById ( hash = ( hash || '' ) . replace ( / ^# / , '' ) ) ; if ( target && target . id === hash && target . nodeName === "A" ) { var rect = target . getBoundingClientRect ( ) ; global . scrollTo ( ( documentElement . scrollLeft || 0 ) , rect . top + ( documentElement . scrollTop || 0 ) - ( documentElement . clientTop || 0 ) ) ; } }
Scroll page to current anchor in url-hash

@param hash
Scroll page to current anchor in url - hash