remember position of column titles
[newtab.git] / options.js
index 44eacbca0828aca980c3a46b1dce65cea70f59fb..a12b9c9b3786c423fa41fb8422874f20fe73623e 100644 (file)
@@ -2,8 +2,8 @@ function save_options() {
     var l1name = document.getElementById('l1').value;
     var l2name = document.getElementById('l2').value;
     var l3name = document.getElementById('l3').value;
-    
     var bgvalue = document.getElementById('bg').value;
+    var fgvalue = document.getElementById('fg').value;
     console.log(bgvalue);
 
     chrome.storage.sync.set({
@@ -11,6 +11,7 @@ function save_options() {
        "l2name": l2name,
         "l3name": l3name,
        "bgvalue": bgvalue,
+       "fgvalue": fgvalue,
        }, function() {
        window.close();
        
@@ -20,15 +21,17 @@ function save_options() {
 
 function restore_options() {
     chrome.storage.sync.get({
-    "l1name": "list1",
-    "l2name": "list2",
-    "l3name": "list3",
-    "bgvalue": "#222222"},
+    "l1name": "Productivity",
+    "l2name": "General",
+    "l3name": "Social",
+    "bgvalue": "#2E3440",
+    "fgvalue": "#D8DEE9"},
     function(items) {
         document.getElementById('l1').value = items["l1name"];
        document.getElementById('l2').value = items["l2name"];
         document.getElementById('l3').value = items["l3name"];
-       document.getElementById('bg').value = items["bgvalue"];
+        document.getElementById('bg').value = items["bgvalue"];
+       document.getElementById('fg').value = items["fgvalue"];
     });
 }