MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / render

Function render

src/pages/plugins/plugins.js:323–352  ·  view source on GitHub ↗
(section)

Source from the content-addressed store, hash-verified

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");

Callers 5

PluginsIncludeFunction · 0.70
plugins.jsFile · 0.70
renderAllFunction · 0.70
renderInstalledFunction · 0.70
renderOwnedFunction · 0.70

Calls 5

getAllPluginsFunction · 0.85
addMethod · 0.80
hideSearchBarFunction · 0.50
removeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected