anchor.diff:  
       window.onpopstate = function(event) {
         if (event.state) {
  -        // console.log('event.state in onpopstate', event.state);
           scroll_positions = event.state['scroll_positions'];
           if (event.state['index']) load_index_trips(event.state['index'].start * 1000);
           if (event.state.edit) $.get(event.state.edit, function(data){ load_edit_trip(data.form) }, "json");
  
positive.code:           $.getJSON('<%= trips_path :json %>',
              calendar_range,
              function(data, textStatus, jqXHR){  
                // console.log ('scroll_positions in getJSON', scroll_positions);
                
                // we probably didn't have the right range before, so now  we should update the state
                if ( on_trip_index() ) replace_index_state();
  
negative.code:     }
      
      function push_index_state() {
        if (supports_history_api()) history.pushState({index: calendar_range, scroll_positions: scroll_positions}, "list trips", "<%= trips_path %>?" + $.param(calendar_range));
      }
      
      function replace_index_state() {
        if (supports_history_api()) history.replaceState({index: calendar_range, scroll_positions: scroll_positions}, "list trips", "<%= trips_path %>?" + $.param(calendar_range));
      }
      
      function push_edit_state(path) {
        if (supports_history_api()) history.pushState({edit: path}, "edit trip", path);
      }
      
  