<commit_before>'use strict';

// load default on document ready event and start nav function
$(document).ready(function() {
  chrome.runtime.sendMessage({ payload: "set" }, function(response) {
    if (response.name === null) {
      $('#about').attr("state", "active");
      $('#content').load('about.html').show();
    }
    else {
      $('#content').load('tree.html').show();
    }

    nav();
  });
});

function nav() {
  $('.nav li').click(function() {
    $('.nav').children('li').attr('state', 'inactive');
    $(this).attr('state', 'active');

    $('#content').load($(this).attr('id') + '.html');
  });
}


// navigation button listener function
// changes content displayed in content div
function oldnav() {
  $('#about').click(function() {
    deactivateAll();
    $(this).attr("state", "active");
    $('#content').load('about.html');
  });

  $('#current').click(function() {
    deactivateAll();
    $(this).attr("state", "active");
    chrome.runtime.sendMessage({ payload: "set"}, function() {      
      $('#content').load('tree.html');
    });
  });

  $('#show-history').click(function() {
    deactivateAll();
    $(this).attr("state", "active");
    $('#content').load('history.html'); 
  });

  $('#nav').show();
}<commit_msg>Fix #69 and clean deprecated nav code<commit_after>'use strict';

// load default on document ready event and start nav function
$(document).ready(function() {
  chrome.runtime.sendMessage({ payload: 'set' }, function(response) {
    if (response.name == null) {
      $('#about').attr('state', 'active');
      $('#content').load('about.html');
    }
    else {
      $('#tree').attr('state', 'active');
      $('#content').load('tree.html');
    }

    nav();
  });
});

function nav() {
  $('.nav li').click(function() {
    $('.nav').children('li').attr('state', 'inactive');
    $(this).attr('state', 'active');

    $('#content').load($(this).attr('id') + '.html');
  });
}
{'fraction_non_alphanumeric': 0.2593167701863354, 'fraction_numerical': 0.0010351966873706005, 'mean_word_length': 3.6023809523809525, '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': '7261993', 'n_tokens_mistral': 593, 'n_tokens_neox': 593, 'n_words': 112}