<commit_before>function OpenManager() {
  chrome.tabs.create({url:"manager.html"});
}
document.getElementById("managerBtn").onclick = OpenManager;
chrome.tabs.getSelected(function(tab){
  document.getElementById("newEntryTitle").value = tab.title;
  document.getElementById("newEntryUrl").value = tab.url;
})
document.getElementById("newEntrySubmit").onclick = function(){
  if (localStorage["entries"] == undefined) {
    localStorage["entries"] = [];
  }
  url = document.getElementById("newEntryUrl").value;
  title = document.getElementById("newEntryTitle").value;
  localStorage["entries"] = {}
  localStorage["entries"][url] = {
    "title": title
  };
};<commit_msg>Put entry into localStorage<commit_after>function OpenManager() {
  chrome.tabs.create({url:"manager.html"});
}
document.getElementById("managerBtn").onclick = OpenManager;
chrome.tabs.getSelected(function(tab){
  document.getElementById("newEntryTitle").value = tab.title;
  document.getElementById("newEntryUrl").value = tab.url;
})
document.getElementById("newEntrySubmit").onclick = function(){
  url = document.getElementById("newEntryUrl").value;
  title = document.getElementById("newEntryTitle").value;
  entriesStr = localStorage["entries"]
  if (entriesStr == undefined) {
    entries = {};
  }
  else {
    entries = JSON.parse(entriesStr);
  }
  console.log(JSON.stringify(entries));
  entries[url] = title;
  localStorage["entries"] = JSON.stringify(entries);
};
{'fraction_non_alphanumeric': 0.16574585635359115, 'fraction_numerical': 0.0, 'mean_word_length': 6.208955223880597, 'pattern_counts': {'":': 1, '<': 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': '3237480', 'n_tokens_mistral': 411, 'n_tokens_neox': 406, 'n_words': 57}