diff options
| author | 2019-04-01 23:43:20 +0200 | |
|---|---|---|
| committer | 2019-04-01 23:43:20 +0200 | |
| commit | e5c8d52aa1ef5a624512b5faf64ea30697ef7e4c (patch) | |
| tree | 24424f47f8bfedc7484dfc0a85394697b25685fb /p/scripts | |
| parent | 694af5434ea79c0c7e06d0be5b771751f77fb9df (diff) | |
Fix ASC load more (#2318)
https://github.com/FreshRSS/FreshRSS/issues/2314
Diffstat (limited to 'p/scripts')
| -rw-r--r-- | p/scripts/main.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js index f59976b39..04bf50c81 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -1286,12 +1286,11 @@ function load_more_posts() { paginationNew = streamAdopted.querySelector('.pagination'); formPagination.replaceChild(paginationNew, paginationOld); - if (context.display_order === 'ASC') { - document.querySelector('#nav_menu_read_all .read_all').formAction = - document.getElementById('bigMarkAsRead').formAction; - } else { - const bigMarkAsRead = document.getElementById('bigMarkAsRead'); - if (bigMarkAsRead) { + const bigMarkAsRead = document.getElementById('bigMarkAsRead'); + if (bigMarkAsRead) { + if (context.display_order === 'ASC') { + document.querySelector('#nav_menu_read_all .read_all').formAction = bigMarkAsRead.formAction; + } else { bigMarkAsRead.formAction = document.querySelector('#nav_menu_read_all .read_all').formAction; } } @@ -1305,8 +1304,7 @@ function load_more_posts() { init_load_more(box_load_more); - const bigMarkAsRead = document.getElementById('bigMarkAsRead'), - div_load_more = document.getElementById('load_more'); + const div_load_more = document.getElementById('load_more'); if (bigMarkAsRead) { bigMarkAsRead.removeAttribute('disabled'); } |
