<commit_before>var ref = new Firebase("https://5ire-adsina.firebaseio.com"); //Use your app's Firebase URL

ref.on("value", function(snapshot) {
  console.log(snapshot.val());
  update(snapshot);
}, function (errorObject) {
  console.log("The read failed: " + errorObject.code);
});

// Add some event handlers for FB events

$(document).ready(function(){
  console.log("Document loaded");
  $("#add-form").submit(function(event){
    event.preventDefault();
    console.log("Form submitted!");

    var fields = {
      "firstName": $("#firstname").val(),
      "lastName": $("#lastname").val(),
      "email": $("#email").val(),
      "message": $("#feedback").val(),
      "timestamp": new Date().getTime()
    }

    ref.push(fields)


  });
});

function update(snapshot) {
  var data = snapshot.val();
  for (var c in data){
    var comment = data[c];
    var newLi = $(document.createElement("li"));
    newLi.append("<h2>" + comment.firstName + " " + comment.lastName + "</h2>" + "<h3>" + comment.message + "</h3>" + "<h4>" + comment.email + "</h4>" + "<h5>" + comment.timestamp);<commit_msg>Just need to get the like working<commit_after>var ref = new Firebase("https://5ire-adsina.firebaseio.com"); //Use your app's Firebase URL

ref.on("value", function(snapshot) {
  console.log(snapshot.val());
  update(snapshot);
}, function (errorObject) {
  console.log("The read failed: " + errorObject.code);
});

// Add some event handlers for FB events

$(document).ready(function(){
  console.log("Document loaded");
  $("#add-form").submit(function(event){
    event.preventDefault();
    console.log("Form submitted!");

    var fields = {
      "firstName": $("#firstname").val(),
      "lastName": $("#lastname").val(),
      "email": $("#email").val(),
      "message": $("#feedback").val(),
      "timestamp": new Date().getTime()
      "likes" :
    }

    ref.push(fields)


  });
});

function update(snapshot) {
  var data = snapshot.val();
  for (var c in data){
    var comment = data[c];
    var likes = 
    var commentDate = new Date(comment.timestamp);
    var newLi = $(document.createElement("li"));
    newLi.append("<h2>" + comment.firstName + " " + comment.lastName + "</h2>" + "<h3>" + comment.message + "</h3>" + "<h4>" + comment.email + "</h4>" + "<h5>" + commentDate.toLocaleTimeString() + ", " + commentDate.toLocaleDateString());
{'fraction_non_alphanumeric': 0.2138924184667514, 'fraction_numerical': 0.006776789495976281, 'mean_word_length': 3.771717171717172, 'pattern_counts': {'":': 10, '<': 17, '<?xml version=': 0, '>': 17, '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': '5370385', 'n_tokens_mistral': 745, 'n_tokens_neox': 739, 'n_words': 163}