<commit_before>(function () {
  'use strict';

  function saveOptions () {
    var weapons = document.getElementById('items').value;
    var rate = document.getElementById('rate').value;

    chrome.storage.sync.set({
      weapons: weapons,
      rate: rate
    }, function() {
      var status = document.getElementById('status');
      status.textContent = 'Options saved.';
      setTimeout(function() {
        status.textContent = '';
      }, 750);
    });
  }

  function restoreOptions () {
    chrome.storage.sync.get({
      weapons: 'knife,karambit,bayonet,awp,m4a4,m4a1,ak-47,glock-18',
      rate: 200
    }, function(data) {
      document.getElementById('items').value = data.weapons;
      document.getElementById('rate').value = data.rate;
    });
  }

  document.addEventListener('DOMContentLoaded', restoreOptions);
  document.getElementById('save').addEventListener('click', saveOptions);

})();<commit_msg>cleanup<commit_after>(function () {
  'use strict';

  function saveOptions () {
    var weapons = document.getElementById('items').value;
    var rate = document.getElementById('rate').value;

    chrome.storage.sync.set({
      weapons: weapons,
      rate: rate
    }, function () {
      var status = document.getElementById('status');
      status.textContent = 'Options saved.';
      setTimeout(function () {
        status.textContent = '';
      }, 750);
    });
  }

  function restoreOptions () {
    chrome.storage.sync.get({
      weapons: 'knife,karambit,bayonet,awp,m4a4,m4a1,ak-47,glock-18',
      rate: 200
    }, function (data) {
      document.getElementById('items').value = data.weapons;
      document.getElementById('rate').value = data.rate;
    });
  }

  document.addEventListener('DOMContentLoaded', restoreOptions);
  document.getElementById('save').addEventListener('click', saveOptions);

})();
{'fraction_non_alphanumeric': 0.15650296815974096, 'fraction_numerical': 0.015110631408526714, 'mean_word_length': 3.3726415094339623, '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': '2515077', 'n_tokens_mistral': 555, 'n_tokens_neox': 526, 'n_words': 85}