MCPcopy Create free account
hub / github.com/Forward-Future/loopy / readUrlState

Function readUrlState

loop-library/site/script.js:351–364  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

349 if (method === "push" && typeof window.history.pushState === "function") {
350 window.history.pushState(null, "", nextUrl);
351 } else {
352 window.history.replaceState(null, "", nextUrl);
353 }
354}
355
356function readUrlState() {
357 const params = new URLSearchParams(window.location.search);
358
359 if (searchInput) {
360 searchInput.value = params.get("q") ?? "";
361 }
362
363 applyCategory(params.get("category") ?? "all");
364 applySort(params.get("sort") ?? "featured");
365
366 const requestedPage = Number.parseInt(params.get("page") ?? "1", 10);
367 currentPage =

Callers 1

script.jsFile · 0.85

Calls 3

applyCategoryFunction · 0.85
applySortFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected