tidy up dir structure & make hover colour user-selectable
[newtab.git] / options.js
index 7580131f78b69e43f5e9eca1d7249a43ae84834f..50598de073b88fd597049ceca8d3966bacc9a149 100644 (file)
@@ -1,25 +1,30 @@
 function save_options() {
-    var bgvalue = document.getElementById('bg').value;
-    var fgvalue = document.getElementById('fg').value;
-    console.log(bgvalue);
+  var bgvalue = document.getElementById('bg').value;
+  var fgvalue = document.getElementById('fg').value;
+  var hrvalue = document.getElementById('hr').value;
+  console.log(bgvalue);
 
-    chrome.storage.sync.set({
-       "bgvalue": bgvalue,
-       "fgvalue": fgvalue,
-       }, function() {
-       window.close();
-       
-       });
+  chrome.storage.sync.set({
+    "bgvalue": bgvalue,
+    "fgvalue": fgvalue,
+    "hrvalue": hrvalue,
+  }, function() {
+    window.close();
+
+  });
 }
 
 
 function restore_options() {
-    chrome.storage.sync.get({
-    "bgvalue": "#2E3440",
-    "fgvalue": "#D8DEE9"},
+  chrome.storage.sync.get({
+    "bgvalue": "#2e3440",
+    "fgvalue": "#d8dee9",
+    "hrvalue": "#434c5e"
+  },
     function(items) {
-        document.getElementById('bg').value = items["bgvalue"];
-       document.getElementById('fg').value = items["fgvalue"];
+      document.getElementById('bg').value = items["bgvalue"];
+      document.getElementById('fg').value = items["fgvalue"];
+      document.getElementById('hr').value = items["hrvalue"];
     });
 }