aboutsummaryrefslogtreecommitdiff
path: root/p/scripts/feed.js
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-02-09 13:57:20 +0100
committerGravatar GitHub <noreply@github.com> 2023-02-09 13:57:20 +0100
commit05ae1b0d2684cea4eda664c5ea1a995cb9f0c4b9 (patch)
tree7f8bac745b5431139bec5197afc288ee694d28f5 /p/scripts/feed.js
parentb9a62a6aaacf2763c45f503ed5602ba43bedfce0 (diff)
XML+XPath (#5076)
* XML+XPath #fix https://github.com/FreshRSS/FreshRSS/issues/5075 Implementation allowing to take an XML document as input using an XML parser (instead of an HTML parser for HTML+XPath) * Remove noise from another PR * Better MIME for XML * And add glob *.xml for cache cleaning * Minor syntax * Add glob json for clean cache
Diffstat (limited to 'p/scripts/feed.js')
-rw-r--r--p/scripts/feed.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/p/scripts/feed.js b/p/scripts/feed.js
index 1a6833db6..29af2a3ea 100644
--- a/p/scripts/feed.js
+++ b/p/scripts/feed.js
@@ -88,10 +88,17 @@ function init_disable_elements_on_update(parent) {
function init_select_show(parent) {
const listener = (select) => {
const options = select.querySelectorAll('option[data-show]');
+ const shows = {}; // To allow multiple options to show the same element
for (const option of options) {
- const elem = document.getElementById(option.dataset.show);
+ if (!shows[option.dataset.show]) {
+ shows[option.dataset.show] = option.selected;
+ }
+ }
+
+ for (const show in shows) {
+ const elem = document.getElementById(show);
if (elem) {
- elem.style.display = option.selected ? 'block' : 'none';
+ elem.style.display = shows[show] ? 'block' : 'none';
}
}
};