<commit_before>if (localStorage.AvertedCounter === 'undefined') {
  console.log ("you dun fudged up")
  localStorage.AvertedCounter = 0;
};



var up = function() {
  localStorage.AvertedCounter++;
  document.getElementById("counter").value = localStorage.AvertedCounter;
}

var down = function() {
  localStorage.AvertedCounter--;
  document.getElementById("counter").value = localStorage.AvertedCounter;
}

document.addEventListener('DOMContentLoaded', function() {
    var idup = document.getElementById('up');
    // onClick's logic below:
    idup.addEventListener('click', function() {
        up();
        console.log ("You get up cake!");
    });
});


document.addEventListener('DOMContentLoaded', function() {
    var iddown = document.getElementById('down');
    // onClick's logic below:
    iddown.addEventListener('click', function() {
        down();
        console.log ("You get down cake!");
    });
});

function saveChanges() {
        // Get a value saved in a form.
        var theValue = textarea.value;
        // Check that there's some code there.
        if (!theValue) {
          message('Error: No value specified');
          return;
        }
        // Save it using the Chrome extension storage API.
        chrome.storage.sync.set({'value': theValue}, function() {
          // Notify that we saved.
          message('Settings saved');
        });
      }<commit_msg>Added annotations to script.js<commit_after>//First check if our variable exists
if (localStorage.AvertedCounter === 'undefined') {
  console.log ("you dun fudged up")
  localStorage.AvertedCounter = 0; //If it doesn't exist, then create it
};



var up = function() {
  localStorage.AvertedCounter++; //Add 1 to our counter
  document.getElementById("counter").value = localStorage.AvertedCounter; //Update the input to our new number
}

var down = function() {
  localStorage.AvertedCounter--;
  document.getElementById("counter").value = localStorage.AvertedCounter;
}

document.addEventListener('DOMContentLoaded', function() {
    var idup = document.getElementById('up');
    // onClick's logic below:
    idup.addEventListener('click', function() {
        up();
        console.log ("You get up cake!"); //A rewarding debug message
    });
});


document.addEventListener('DOMContentLoaded', function() {
    var iddown = document.getElementById('down');
    // onClick's logic below:
    iddown.addEventListener('click', function() {
        down();
        console.log ("You get down cake!"); //Another rewarding debug message
    });
});
{'fraction_non_alphanumeric': 0.13949843260188088, 'fraction_numerical': 0.0011755485893416929, 'mean_word_length': 3.255, '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': '3892212', 'n_tokens_mistral': 684, 'n_tokens_neox': 664, 'n_words': 186}