()
| 685 | } |
| 686 | |
| 687 | function updateLoadMoreVisibility() { |
| 688 | const remaining = currentFiltered.length - renderIndex; |
| 689 | if (remaining > 0) { |
| 690 | if (!loadMoreBtn.isConnected) list.appendChild(loadMoreBtn); |
| 691 | loadMoreBtn.textContent = tf('load_more_folders', 'Load more folders') + ` (${remaining})`; |
| 692 | } else if (loadMoreBtn.isConnected) { |
| 693 | loadMoreBtn.remove(); |
| 694 | } |
| 695 | } |
| 696 | |
| 697 | function render(filter = "") { |
| 698 | renderIndex = 0; |