options.json commit keyboard shortcuts & mouseover events (ce3ce1f)
   1function save_options() {
   2    var l1name = document.getElementById('l1').value;
   3    var l2name = document.getElementById('l2').value;
   4    var l3name = document.getElementById('l3').value;
   5    var bgvalue = document.getElementById('bg').value;
   6    var fgvalue = document.getElementById('fg').value;
   7    console.log(bgvalue);
   8
   9    chrome.storage.sync.set({
  10        "l1name": l1name,
  11        "l2name": l2name,
  12        "l3name": l3name,
  13        "bgvalue": bgvalue,
  14        "fgvalue": fgvalue,
  15        }, function() {
  16        window.close();
  17        
  18        });
  19}
  20
  21
  22function restore_options() {
  23    chrome.storage.sync.get({
  24    "l1name": "Productivity",
  25    "l2name": "General",
  26    "l3name": "Social",
  27    "bgvalue": "#2E3440",
  28    "fgvalue": "#D8DEE9"},
  29    function(items) {
  30        document.getElementById('l1').value = items["l1name"];
  31        document.getElementById('l2').value = items["l2name"];
  32        document.getElementById('l3').value = items["l3name"];
  33        document.getElementById('bg').value = items["bgvalue"];
  34        document.getElementById('fg').value = items["fgvalue"];
  35    });
  36}
  37
  38document.addEventListener('DOMContentLoaded', restore_options);
  39document.getElementById('save').addEventListener('click', save_options);