PageSourceSearch

https://www.westvalley.edu/_resources/js/blog-article.js

js westvalley.edu collected 2026-10-01 11:39:19 UTC 1,344 bytes, 48 lines download raw bytes

1document.addEventListener("DOMContentLoaded", function () {
2  const categoryFilter = document.getElementById("category-filter");
3  const yearFilter = document.getElementById("year-filter");
4  const searchInput = document.querySelector('input[aria-label="search input"]');
5  const searchButton = document.getElementById("searchButton");
6
7  function redirectToListingPage() {
8    const params = new URLSearchParams();
9
10    if (categoryFilter && categoryFilter.value) {
11      params.set("category", categoryFilter.value);
12    }
13
14    if (yearFilter && yearFilter.value) {
15      params.set("year", yearFilter.value);
16    }
17
18    if (searchInput && searchInput.value.trim() !== "") {
19      params.set("search", searchInput.value.trim());
20    }
21
22    window.location.href = `../index.html?${params.toString()}`;
23  }
24
25  if (categoryFilter) {
26    categoryFilter.addEventListener("change", redirectToListingPage);
27  }
28
29  if (yearFilter) {
30    yearFilter.addEventListener("change", redirectToListingPage);
31  }
32
33  if (searchButton) {
34    searchButton.addEventListener("click", function (e) {
35      e.preventDefault();
36      redirectToListingPage();
37    });
38  }
39
40  if (searchInput) {
41    searchInput.addEventListener("keypress", function (e) {
42      if (e.key === "Enter") {
43        e.preventDefault();
44        redirectToListingPage();
45      }
46    });
47  }
48});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.