(section)
| 321 | } |
| 322 | |
| 323 | function render(section) { |
| 324 | if (currSection === section) return; |
| 325 | |
| 326 | if (!section) { |
| 327 | section = currSection; |
| 328 | } |
| 329 | |
| 330 | if (document.getElementById("search-bar")) { |
| 331 | hideSearchBar(); |
| 332 | } |
| 333 | |
| 334 | const $section = $list[section]; |
| 335 | $currList._scroll = $currList.scrollTop; |
| 336 | $currList.replaceWith($section); |
| 337 | $section.scrollTop = $section._scroll || 0; |
| 338 | $currList = $section; |
| 339 | currSection = section; |
| 340 | if (section === "all") { |
| 341 | currentPage = 1; |
| 342 | hasMore = true; |
| 343 | isLoading = false; |
| 344 | plugins.all = []; // Reset the all plugins array |
| 345 | $list.all.replaceChildren(); |
| 346 | if (!currentFilter) { |
| 347 | getAllPlugins(); |
| 348 | } |
| 349 | } |
| 350 | $page.get(".options .active").classList.remove("active"); |
| 351 | $page.get(`#${section}_plugins`).classList.add("active"); |
| 352 | } |
| 353 | |
| 354 | function renderAll() { |
| 355 | render("all"); |
no test coverage detected