diff options
| author | 2023-02-09 13:57:20 +0100 | |
|---|---|---|
| committer | 2023-02-09 13:57:20 +0100 | |
| commit | 05ae1b0d2684cea4eda664c5ea1a995cb9f0c4b9 (patch) | |
| tree | 7f8bac745b5431139bec5197afc288ee694d28f5 /p/scripts/feed.js | |
| parent | b9a62a6aaacf2763c45f503ed5602ba43bedfce0 (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.js | 11 |
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'; } } }; |
