diff options
| author | 2019-02-23 14:39:20 +0100 | |
|---|---|---|
| committer | 2019-02-23 14:39:20 +0100 | |
| commit | b869c2944a01c5060d05a093d5e0c797d48bb159 (patch) | |
| tree | 0eee3314fde4b848507f070d0aeba3dd745ccdb9 /p/scripts/extra.js | |
| parent | c90c0361a840ef55addae2edb5b9476381f699a6 (diff) | |
JavaScript fixes + new navigation loop behaviour (#2255)
* Fixed user configuration 404
https://github.com/FreshRSS/FreshRSS/pull/2234#issuecomment-466561555
* Fixed "SPACE" shortcut bug
https://github.com/FreshRSS/FreshRSS/pull/2234#issuecomment-466626412
* Use next feed / previous feed when reaching last / first article
instead of looping
* Jump to next / previous category when reaching last / first feed
instead of looping
Diffstat (limited to 'p/scripts/extra.js')
| -rw-r--r-- | p/scripts/extra.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/p/scripts/extra.js b/p/scripts/extra.js index 7a0ef0477..c0d0c89e1 100644 --- a/p/scripts/extra.js +++ b/p/scripts/extra.js @@ -142,8 +142,14 @@ function init_password_observers() { function init_select_observers() { document.querySelectorAll('.select-change').forEach(function (s) { s.onchange = function (ev) { - const opt = s.options[s.selectedIndex]; - location.href = opt.getAttribute('data-url'); + const opt = s.options[s.selectedIndex], + url = opt.getAttribute('data-url'); + if (url) { + s.form.querySelectorAll('[type=submit]').forEach(function (b) { + b.disabled = true; + }); + location.href = url; + } }; }); } |
