<commit_before>$(document).ready(function() {
  var challengeName = typeof challengeName !== undefined ? challengeName : 'Untitled';
  if (challengeName) {
    ga('send', 'event',  'Challenge', 'load', challengeName);
  }

  $(document).ready(function() {
    if (typeof editor !== 'undefined') {
      $('#reset-button').on('click', resetEditor);
    }
  });

  var CSRF_HEADER = 'X-CSRF-Token';

  var setCSRFToken = function(securityToken) {
    jQuery.ajaxPrefilter(function(options, _, xhr) {
      if (!xhr.crossDomain) {
        xhr.setRequestHeader(CSRF_HEADER, securityToken);
      }
    });
  };

  setCSRFToken($('meta[name="csrf-token"]').attr('content'));

  $('.checklist-element').each(function() {
    var checklistElementId = $(this).attr('id');
    if(!!localStorage[checklistElementId]) {
      $(this).children().children('li').addClass('faded');
      $(this).children().children('input').trigger('click');
    }
  });

  $('.start-challenge').on('click', function() {
    $(this).parent().remove();
    $('.challenge-content')
      .removeClass('hidden-element')
      .addClass('animated fadeInDown');
  });

  $('.challenge-list-checkbox').on('change', function() {
    var checkboxId = $(this).parent().parent().attr('id');
    if ($(this).is(":checked")) {
      $(this).parent().siblings().children().addClass('faded');
      if (!localStorage || !localStorage[checkboxId]) {
        localStorage[checkboxId] = true;
      }
    }
    if (!$(this).is(":checked")) {
      $(this).parent().siblings().children().removeClass('faded');
      if (localStorage[checkboxId]) {
        localStorage.removeItem(checkboxId);
      }
    }
  });

  $("img").error(function () {
    $(this).unbind("error").attr("src", "https://s3.amazonaws.com/freecodecamp/camper-image-placeholder.png");
  });

  function reBindModals(){

      $('.close-modal').unbind('click');
      $('.close-modal').on('click', function(){
        setTimeout(function() {
          $('#issue-modal').modal('hide');
        }, 2000);
      });

      $('#report-issue').unbind('click');
      $('#report-issue').on('click', function() {
          $('#issue-modal').modal('hide');
          window.open('https://github.com/freecodecamp/freecodecamp/issues/new?&body=Challenge '+ window.location.href +' has an issue. Please describe how to reproduce it, and include links to screenshots if possible.', '_blank')
      });

      $('#completed-courseware').unbind('click');
      $('#completed-courseware').on('click', function() {
          $('#complete-courseware-dialog').modal('show');
      });

      $('#completed-courseware-editorless').unbind('click');
      $('#completed-courseware-editorless').on('click', function() {
          $('#complete-courseware-editorless-dialog').modal('show');
      });

      $('#trigger-pair-modal').unbind('click');
      $('#trigger-pair-modal').on('click', function() {
          $('#pair-modal').modal('show');
      });
<commit_msg>Fixed help modal part 2<commit_after>$(document).ready(function() {
  var challengeName = typeof challengeName !== undefined ? challengeName : 'Untitled';
  if (challengeName) {
    ga('send', 'event',  'Challenge', 'load', challengeName);
  }

  $(document).ready(function() {
    if (typeof editor !== 'undefined') {
      $('#reset-button').on('click', resetEditor);
    }
  });

  var CSRF_HEADER = 'X-CSRF-Token';

  var setCSRFToken = function(securityToken) {
    jQuery.ajaxPrefilter(function(options, _, xhr) {
      if (!xhr.crossDomain) {
        xhr.setRequestHeader(CSRF_HEADER, securityToken);
      }
    });
  };

  setCSRFToken($('meta[name="csrf-token"]').attr('content'));

  $('.checklist-element').each(function() {
    var checklistElementId = $(this).attr('id');
    if(!!localStorage[checklistElementId]) {
      $(this).children().children('li').addClass('faded');
      $(this).children().children('input').trigger('click');
    }
  });

  $('.start-challenge').on('click', function() {
    $(this).parent().remove();
    $('.challenge-content')
      .removeClass('hidden-element')
      .addClass('animated fadeInDown');
  });

  $('.challenge-list-checkbox').on('change', function() {
    var checkboxId = $(this).parent().parent().attr('id');
    if ($(this).is(":checked")) {
      $(this).parent().siblings().children().addClass('faded');
      if (!localStorage || !localStorage[checkboxId]) {
        localStorage[checkboxId] = true;
      }
    }
    if (!$(this).is(":checked")) {
      $(this).parent().siblings().children().removeClass('faded');
      if (localStorage[checkboxId]) {
        localStorage.removeItem(checkboxId);
      }
    }
  });

  $("img").error(function () {
    $(this).unbind("error").attr("src", "https://s3.amazonaws.com/freecodecamp/camper-image-placeholder.png");
  });

  function reBindModals(){

      $('.close-modal').unbind('click');
      $('.close-modal').on('click', function(){
        setTimeout(function() {
          $('#help-modal').modal('hide');
        }, 200);
      });

      $('#report-issue').unbind('click');
      $('#report-issue').on('click', function() {
          $('#issue-modal').modal('hide');
          window.open('https://github.com/freecodecamp/freecodecamp/issues/new?&body=Challenge '+ window.location.href +' has an issue. Please describe how to reproduce it, and include links to screenshots if possible.', '_blank')
      });

      $('#completed-courseware').unbind('click');
      $('#completed-courseware').on('click', function() {
          $('#complete-courseware-dialog').modal('show');
      });

      $('#completed-courseware-editorless').unbind('click');
      $('#completed-courseware-editorless').on('click', function() {
          $('#complete-courseware-editorless-dialog').modal('show');
      });

      $('#trigger-pair-modal').unbind('click');
      $('#trigger-pair-modal').on('click', function() {
          $('#pair-modal').modal('show');
      });

{'fraction_non_alphanumeric': 0.2244279946164199, 'fraction_numerical': 0.0016823687752355316, 'mean_word_length': 3.4465220643231116, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '5796117', 'n_tokens_mistral': 1807, 'n_tokens_neox': 1772, 'n_words': 232}