<commit_before>
$(document).ready(function() {

    tabSelectListener();
    questionCommentButtonListener();
    // answerCommentButtonListener();


});

  var tabSelectListener = function(){
    $('.tabs li a').on('click', function(event) {
      event.preventDefault();
      $('.active').removeClass('active');
      $(this).parent().addClass('active');
      if ($(this).attr("id") == "current"){ //detection for current tab
     return
     // returns tab content
    }
    else{
    $(".content").hide(); //Hide all content
    $(".tabs li").attr("id",""); //Reset id's
    $(this).parent().attr("id","current"); // Activate this
    $( $(this).attr('href')).fadeIn();
  }

  });
};

  var questionCommentButtonListener = function(){
    $('#question_comment_button').on('click', function(event){
      event.preventDefault();
      console.log($(this).children().children().attr('href'))

      $.ajax({
        url: $(this).children().children().attr('href'),
        method: 'get'
      }).done(function(response) {

        $("#comment-box").prepend(response);
        $("#question_comment_button").hide();

      }).fail(function(response) {
        console.log("whoops")
      })
    })
  }

  // var answerCommentButtonListener = function(){
  //   $('#answer_comment_button').on('click', function(event){
  //     event.preventDefault();<commit_msg>Add working version for presentation<commit_after>
$(document).ready(function() {

    tabSelectListener();
    questionCommentButtonListener();
    // questionCommentSubmitListener();
    // answerCommentButtonListener();


});

  var tabSelectListener = function(){
    $('.tabs li a').on('click', function(event) {
      event.preventDefault();
      $('.active').removeClass('active');
      $(this).parent().addClass('active');
      if ($(this).attr("id") == "current"){ //detection for current tab
     return
     // returns tab content
    }
    else{
    $(".content").hide(); //Hide all content
    $(".tabs li").attr("id",""); //Reset id's
    $(this).parent().attr("id","current"); // Activate this
    $( $(this).attr('href')).fadeIn();
  }

  });
};

  var questionCommentButtonListener = function(){
    $('#question_comment_button').on('click', function(event){
      event.preventDefault();
      console.log($(this).children().children().attr('href'))

      $.ajax({
        url: $(this).children().children().attr('href'),
        method: 'get'
      }).done(function(response) {

        $("#comment-box").prepend(response);
        $("#question_comment_button").hide();

      }).fail(function(response) {
        console.log("whoops")
      })
    })
  }

  // var questionCommentSubmitListener = function(){
  //   $('#comment-box > form > input[type="submit"]:nth-child(8)').on("click", function(e){
  //     e.preventDefault();
  //   })
  // }

  // var answerCommentButtonListener = function(){
  //   $('#answer_comment_button').on('click', function(event){
  //     event.preventDefault();
{'fraction_non_alphanumeric': 0.21514745308310992, 'fraction_numerical': 0.0003351206434316354, 'mean_word_length': 3.1573816155988856, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6310639', 'n_tokens_mistral': 846, 'n_tokens_neox': 836, 'n_words': 136}