<commit_before>/*
   Add a default clickhandler so we can use hrefs
 */
Backbone.View.prototype.defaultClickHandler = function( e ) {
  if ( e.metaKey || e.ctrlKey || e.altKey ) return;

  var routeTo = $(e.target).closest('a').attr('href');
  console.log("Navigating to "+ routeTo);

  if ( $(e.target).closest('li').hasClass('active') ) {
    Backbone.history.loadUrl( Backbone.history.fragment );
  } else {
    Router.navigate(routeTo, true);
  }

  e.preventDefault();

  return false;
};

/* HACK: this is needed because internal events did not seem to work*/
$("a[rel=backbone]").live("click",Backbone.View.prototype.defaultClickHandler);
<commit_msg>Changed Router.navigate to Backbone.history.navigate<commit_after>/*
   Add a default clickhandler so we can use hrefs
 */
Backbone.View.prototype.defaultClickHandler = function( e ) {
  if ( e.metaKey || e.ctrlKey || e.altKey ) return;

  var routeTo = $(e.target).closest('a').attr('href');
  console.log("Navigating to "+ routeTo);

  if ( $(e.target).closest('li').hasClass('active') ) {
    Backbone.history.loadUrl( Backbone.history.fragment );
  } else {
    Backbone.history.navigate(routeTo, true);
  }

  e.preventDefault();

  return false;
};

/* HACK: this is needed because internal events did not seem to work*/
$("a[rel=backbone]").live("click",Backbone.View.prototype.defaultClickHandler);

{'fraction_non_alphanumeric': 0.16263736263736264, 'fraction_numerical': 0.0, 'mean_word_length': 4.253846153846154, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '248759', 'n_tokens_mistral': 450, 'n_tokens_neox': 440, 'n_words': 97}