Skip to content

Commit 0339881

Browse files
authored
Merge pull request #14 from docsforadobe/landing-page
Landing Page - No Refresh
2 parents 49b3f79 + 48a4353 commit 0339881

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

docs/_static/extensibility-directory.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,10 @@ window.onload = function () {
324324
const searchParams = new URLSearchParams(url);
325325
const filterType = searchParams.has("app") ? "app" : searchParams.has("tag") ? "tag" : "";
326326

327-
const filter = searchParams.get(filterType).split("-").join(" ");
328-
filterList(filter);
327+
if (filterType) {
328+
const filter = searchParams.get(filterType).split("-").join(" ");
329+
filterList(filter);
330+
}
329331
};
330332

331333
/**
@@ -342,7 +344,9 @@ function updateSearchParam(name, value) {
342344
value = value.replace(/\s/g, "-").toLowerCase();
343345

344346
searchParams.set(name, value);
345-
window.location.search = searchParams;
347+
348+
const url = window.location.pathname + "?" + searchParams.toString() + window.location.hash;
349+
window.history.replaceState({ name: name, value: value }, "", url);
346350
}
347351

348352
/**

0 commit comments

Comments
 (0)