<commit_before>$(document).on('click', '.list-close', function () {
  $(this).parents('div.card').fadeOut();
});
function clearScheduleInput(){
  $('#new-schedule-name').val('');
  $('#new-schedule-link').val('');
}
function addScheduleData(name,link,push){
  if (!(name in scheduleListData)){
    var tempDict = {};
    tempDict['name'] = name;
    tempDict['link'] = link;
    scheduleListData[name] = tempDict;
    console.log(scheduleListData);
  }
  if (push === true){
    addScheduleItem(name,link);
    clearScheduleInput();
  }
}
function addScheduleItem(name,link){
  $('#new-schedule-list').append('<div class="card"><div class="row"><div class="col-sm-4" style="text-align:center;"><h5>' + name + '</h5></div><div class="col-sm-5" style="text-align:center;"><h5><a href="'+ link + '/">'+ link +'</a></h5></div><div class="col-sm-2" style="color:white;text-align:right;"><button class="btn btn-danger btn-lg list-close" onclick="removeScheduleData(\'' + name + '\')"><span class="fa fa-remove"></span></button></div></div></div>');
}
function removeScheduleData(name,force){
  if (name in scheduleListData){
    delete scheduleListData[name];
  }
}
function revertScheduleData(){
  scheduleListData = scheduleListDataOld;
  clearScheduleInput();
}

function submitSchedule(){
  $.ajax({
    method: "POST",
    url: "admin.php?editSchedule",
    data: { "data": scheduleListData }
  })
  /*.done(function() {
    alert( "Success");
  })*/;
}

var scheduleData = JSON.parse(httpGet("api/schedule_data.json"));
console.log(scheduleData);

var scheduleListData = {};

for (var key in scheduleData["data"]){
  addScheduleData(scheduleData["data"][key]["name"],scheduleData["data"][key]["link"], true);
}

var scheduleListDataOld = scheduleListData;<commit_msg>debugging<commit_after>$(document).on('click', '.list-close', function () {
  $(this).parents('div.card').fadeOut();
});
function clearScheduleInput(){
  $('#new-schedule-name').val('');
  $('#new-schedule-link').val('');
}
function addScheduleData(name,link,push){
  if (!(name in scheduleListData)){
    var tempDict = {};
    tempDict['name'] = name;
    tempDict['link'] = link;
    scheduleListData[name] = tempDict;
    console.log(scheduleListData);
  }
  if (push === true){
    addScheduleItem(name,link);
    clearScheduleInput();
  }
}
function addScheduleItem(name,link){
  $('#new-schedule-list').append('<div class="card"><div class="row"><div class="col-sm-4" style="text-align:center;"><h5>' + name + '</h5></div><div class="col-sm-5" style="text-align:center;"><h5><a href="'+ link + '/">'+ link +'</a></h5></div><div class="col-sm-2" style="color:white;text-align:right;"><button class="btn btn-danger btn-lg list-close" onclick="removeScheduleData(\'' + name + '\')"><span class="fa fa-remove"></span></button></div></div></div>');
}
function removeScheduleData(name,force){
  if (name in scheduleListData){
    delete scheduleListData[name];
  }
}
function revertScheduleData(){
  scheduleListData = scheduleListDataOld;
  clearScheduleInput();
}

function submitSchedule(){
  $.ajax({
    method: "POST",
    url: "admin.php?editSchedule",
    data: { "data": scheduleListData }
  })
  .done(function() {
    console.log(scheduleListData);
    alert( "Success");
  });
}

var scheduleData = JSON.parse(httpGet("api/schedule_data.json"));
console.log(scheduleData);

var scheduleListData = {};

for (var key in scheduleData["data"]){
  addScheduleData(scheduleData["data"][key]["name"],scheduleData["data"][key]["link"], true);
}

var scheduleListDataOld = scheduleListData;
{'fraction_non_alphanumeric': 0.21623139567537208, 'fraction_numerical': 0.003931479921370402, 'mean_word_length': 5.584103512014788, 'pattern_counts': {'":': 2, '<': 43, '<?xml version=': 0, '>': 43, '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': '2229804', 'n_tokens_mistral': 1149, 'n_tokens_neox': 1141, 'n_words': 192}