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);
+ 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({
- "l1name": l1name,
- "l2name": l2name,
- "l3name": l3name,
- "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({
- "l1name": "Productivity",
- "l2name": "General",
- "l3name": "Social",
- "bgvalue": "#2E3440",
- "fgvalue": "#D8DEE9"},
+ chrome.storage.sync.get({
+ "bgvalue": "#2e3440",
+ "fgvalue": "#d8dee9",
+ "hrvalue": "#434c5e"
+ },
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('fg').value = items["fgvalue"];
+ document.getElementById('bg').value = items["bgvalue"];
+ document.getElementById('fg').value = items["fgvalue"];
+ document.getElementById('hr').value = items["hrvalue"];
});
}