<commit_before>define([
  'jquery',
  'underscore',
  'backbone',
  'templates'
], function ($, _, Backbone, JST) {
  'use strict';

  var NavView = Backbone.View.extend({
    template: JST['app/scripts/templates/nav.ejs'],

    tagName: 'nav',

    initialize: function(vent) {
      this.vent = vent;
    },

    events: {
      'click .home': 'showHome',
      'click .resume': 'showResume',
      'click .signout': 'signout'
    },

    render: function() {
      this.$el.html(this.template());
      return this;
    },

    showHome: function() {
      this.vent.trigger('show:home');
    },

    showResume: function() {
      this.vent.trigger('show:resume');
    },

    userAuthenticated: function(username) {
      this.username = username;
      this.render();
    },

    userSignedOut: function() {
      delete this.username;
      this.render();
    },

    signout: function() {
      this.vent.trigger('session:destroy');
    }
  });

  return NavView;
});
<commit_msg>preventDefault on all nav click events<commit_after>define([
  'jquery',
  'underscore',
  'backbone',
  'templates'
], function ($, _, Backbone, JST) {
  'use strict';

  var NavView = Backbone.View.extend({
    template: JST['app/scripts/templates/nav.ejs'],

    tagName: 'nav',

    initialize: function(vent) {
      this.vent = vent;
    },

    events: {
      'click .home': 'showHome',
      'click .resume': 'showResume',
      'click .signout': 'signout'
    },

    render: function() {
      this.$el.html(this.template());
      return this;
    },

    showHome: function(e) {
      e.preventDefault();
      this.vent.trigger('show:home');
    },

    showResume: function(e) {
      e.preventDefault();
      this.vent.trigger('show:resume');
    },

    signout: function(e) {
      e.preventDefault();
      this.vent.trigger('session:destroy');
    },

    userAuthenticated: function(username) {
      this.username = username;
      this.render();
    },

    userSignedOut: function() {
      delete this.username;
      this.render();
    }
  });

  return NavView;
});

{'fraction_non_alphanumeric': 0.16810758885686838, 'fraction_numerical': 0.0, 'mean_word_length': 2.506734006734007, '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': '2452591', 'n_tokens_mistral': 688, 'n_tokens_neox': 673, 'n_words': 122}