version 0.1.3
This commit is contained in:
parent
846dc6f8a4
commit
f4f252bfec
2 changed files with 6 additions and 0 deletions
|
@ -26,6 +26,9 @@
|
|||
<tr>
|
||||
<td><textarea id="whitelist" rows="3"></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label><input type="checkbox" id="faqs"> Open FAQs page on updates</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<button id="save">Save</button>
|
||||
|
|
|
@ -8,6 +8,7 @@ function prepare(str) {
|
|||
|
||||
function save() {
|
||||
chrome.storage.local.set({
|
||||
faqs: document.getElementById('faqs').checked,
|
||||
blacklist: prepare(document.getElementById('blacklist').value),
|
||||
whitelist: prepare(document.getElementById('whitelist').value),
|
||||
mode: document.getElementById('mode-blacklist').checked ? 'blacklist' : 'whitelist'
|
||||
|
@ -22,10 +23,12 @@ function save() {
|
|||
|
||||
function restore() {
|
||||
chrome.storage.local.get({
|
||||
faqs: true,
|
||||
mode: 'blacklist',
|
||||
whitelist: [],
|
||||
blacklist: []
|
||||
}, prefs => {
|
||||
document.getElementById('faqs').checked = prefs.faqs;
|
||||
document.getElementById('mode-blacklist').checked = prefs.mode === 'blacklist';
|
||||
document.getElementById('mode-whitelist').checked = prefs.mode === 'whitelist';
|
||||
document.getElementById('blacklist').value = prefs.blacklist.join(', ');
|
||||
|
|
Loading…
Reference in a new issue