code: function updateURL() {
    try {
      window.history.replaceState({} , null, '#' + currentPosition());
    } catch (e) {
      window.location.hash = currentPosition();
    }
  }
docs: Updates the current URL to include a hashtag of the current page number.