<commit_before>console.log('show: coming online');

$(function(){

  console.log('show DOM: loaded');

  // Ajax Share List
  // Catch the default submit event for the share list form and then
  // make an ajax call to the share list route and update the DOM
  // to reflect the change
  $('form.fmShareList').on('submit', function(e) {
    e.preventDefault();
    var form = $(this);
    var method = form.attr('method');
    var url = form.attr('action');
    var data = form.serialize();
    console.log('Method:', method);
    console.log('Action:', url);
    console.log('Form Data:', data);

    $.ajax({
      method: method,
      url: url,
      data: data
    }).done(function(data) {
      if (!data.errors) {
        console.log('Save complete', data);
        if(method==='POST') {
          $('#fmShareList').hide();
          $('#ShareDesc').hide();
          $('#fmUnShareList').show();
          $('#unShareDesc').show();
          $('#commentscol').show();
        } else {
          $('#fmShareList').show();
          $('#ShareDesc').show();
          $('#fmUnShareList').hide();
          $('#unShareDesc').hide();
          $('#commentscol').fadeOut('slow', function() {});
          $('.comment.well').fadeOut('slow', function() {
            $(this).remove();
          });
        }
      } else {<commit_msg>Fix issue where epic editor didn't load after sharing a list<commit_after>console.log('show: coming online');

$(function(){

  console.log('show DOM: loaded');

  // Ajax Share List
  // Catch the default submit event for the share list form and then
  // make an ajax call to the share list route and update the DOM
  // to reflect the change
  $('form.fmShareList').on('submit', function(e) {
    e.preventDefault();
    var form = $(this);
    var method = form.attr('method');
    var url = form.attr('action');
    var data = form.serialize();
    console.log('Method:', method);
    console.log('Action:', url);
    console.log('Form Data:', data);

    $.ajax({
      method: method,
      url: url,
      data: data
    }).done(function(data) {
      if (!data.errors) {
        console.log('Save complete', data);
        if(method==='POST') {
          $('#fmShareList').hide();
          $('#ShareDesc').hide();
          $('#fmUnShareList').show();
          $('#unShareDesc').show();
          $('#commentscol').show();
          var editor = new EpicEditor(opts).load();
        } else {
          $('#fmShareList').show();
          $('#ShareDesc').show();
          $('#fmUnShareList').hide();
          $('#unShareDesc').hide();
          $('#commentscol').fadeOut('slow', function() {});
          $('.comment.well').fadeOut('slow', function() {
            $(this).remove();
          });
        }
      } else {
{'fraction_non_alphanumeric': 0.1973256234188652, 'fraction_numerical': 0.0, 'mean_word_length': 2.371498172959805, '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': '2710450', 'n_tokens_mistral': 793, 'n_tokens_neox': 790, 'n_words': 196}