|
|
@@ -1,8 +1,10 @@ |
|
|
|
// Saves options to chrome.storage |
|
|
|
function save_options() { |
|
|
|
var hideDickbar = document.getElementById('dickbar').checked; |
|
|
|
var disableLazyImages = document.getElementById('images').checked; |
|
|
|
chrome.storage.sync.set({ |
|
|
|
hideDickbar: hideDickbar |
|
|
|
hideDickbar: hideDickbar, |
|
|
|
disableLazyImages: disableLazyImages |
|
|
|
}, function() { |
|
|
|
// Update status to let user know options were saved. |
|
|
|
var status = document.getElementById('status'); |
|
|
@@ -17,9 +19,11 @@ function save_options() { |
|
|
|
// stored in chrome.storage. |
|
|
|
function restore_options() { |
|
|
|
chrome.storage.sync.get({ |
|
|
|
hideDickbar: false |
|
|
|
hideDickbar: false, |
|
|
|
disableLazyImages: false |
|
|
|
}, function(items) { |
|
|
|
document.getElementById('dickbar').checked = items.hideDickbar; |
|
|
|
document.getElementById('images').checked = items.disableLazyImages; |
|
|
|
}); |
|
|
|
} |
|
|
|
document.addEventListener('DOMContentLoaded', restore_options); |
|
|
|