Skip to content

Commit

Permalink
Merge pull request #113 from shgysk8zer0/bug/112
Browse files Browse the repository at this point in the history
Fix subscription service selection
  • Loading branch information
shgysk8zer0 authored Oct 25, 2018
2 parents d85f603 + 88f57d3 commit 4a47c95
Show file tree
Hide file tree
Showing 4 changed files with 5,181 additions and 3,658 deletions.
11 changes: 9 additions & 2 deletions js/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,26 @@ window.addEventListener('DOMContentLoaded', async () => {

$('[name]', form).forEach(input => {
input.addEventListener('change', change => {
let skip = false;
if (change.target instanceof HTMLInputElement) {
switch (change.target.type) {
case 'checkbox':
case 'radio':
opts[change.target.name] = change.target.value;
if (change.target.type === 'checkbox' || change.target.checked) {
opts[change.target.name] = change.target.value;
} else {
skip = true;
}
break;
default:
opts[change.target.name] = change.target.value;
}
} else if (change.target instanceof HTMLSelectElement) {
opts[change.target.name] = change.target.value;
}
storage.set(opts);
if (! skip) {
storage.set(opts);
}
});
});

Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Chris Zuber",
"url": "https://shgysk8zer0.github.io"
},
"version": "1.3.4",
"version": "1.3.5",
"description": "__MSG_extensionDescription__",
"homepage_url": "https://github.com/shgysk8zer0/awesome-rss",
"icons": {
Expand Down
Loading

0 comments on commit 4a47c95

Please sign in to comment.