<commit_before>var fbPerson = new Firebase('https://trivia-crossroads.firebaseio.com/Person');

function NewProfile(name, email, location, day, specialty, other){
  this.name = name;
  this.email = email;
  this.location = location;
  this.day = day;
  this.specialty = specialty;
  this.other = other;
}

function onSubmit(event) {
  event.preventDefault();
  response.removeAttribute('class', 'hidden');
  var name = event.target.name.value;
  var email = event.target.email.value;
  var location = event.target.location.value;
  var time = event.target.time.value;
  var specialty = event.target.specialty.value;
  var comment = event.target.comment.value;
  var profileString = JSON.stringify(new NewProfile(name, email, location, time, specialty, comment));
  var UUID = fbPerson.push(profileString);
  document.cookie="UUID=" + UUID.key() + "; expires=Thu, 25 Dec 2020 12:00:00 UTC";
}

var profileData = document.getElementById("profileData");
profileData.addEventListener("submit", onSubmit);<commit_msg>objectified function<commit_after>var fbPerson = new Firebase('https://trivia-crossroads.firebaseio.com/Person');
var profileData = document.getElementById("profileData");

function NewProfile(name, email, location, day, specialty, other){
  this.name = name;
  this.email = email;
  this.location = location;
  this.day = day;
  this.specialty = specialty;
  this.other = other;
}

var storeProfile = {
  onSubmit: function(event) {
    event.preventDefault();
    response.removeAttribute('class', 'hidden');
    var name = event.target.name.value;
    var email = event.target.email.value;
    var location = event.target.location.value;
    var time = event.target.time.value;
    var specialty = event.target.specialty.value;
    var comment = event.target.comment.value;
    var profileString = JSON.stringify(new NewProfile(name, email, location, time, specialty, comment));
    var UUID = fbPerson.push(profileString);
    document.cookie="UUID=" + UUID.key() + "; expires=Thu, 25 Dec 2020 12:00:00 UTC";
  }
}

profileData.addEventListener("submit", storeProfile.onSubmit);
{'fraction_non_alphanumeric': 0.13514804202483285, 'fraction_numerical': 0.011461318051575931, 'mean_word_length': 4.692934782608695, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '163784', 'n_tokens_mistral': 663, 'n_tokens_neox': 628, 'n_words': 144}