PageSourceSearch

https://www.nipponpaintdecor.com/wp-content/themes/nippontheme/src/media.js?ver=1

js nipponpaintdecor.com collected 2026-10-07 06:01:44 UTC 2,320 bytes, 70 lines download raw bytes

1function split_paged_show() {
2    const key = "paged_show";
3    const re = new RegExp("([?&])" + key + "=.*?(&|$)", "i");
4    const uri_split_paged_show = window.location.href.replace(re, "?");
5    return uri_split_paged_show;
6}
7
8function mediaSelected() {
9    const media_cat = document.querySelector("#media_cat");
10    //   const uri = window.loffffffffcation.href.substring(
11    //     0,
12    //     window.location.href.indexOf("?")
13    //   );
14    //   const uri_split = window.location.href.split(/[?&]/);
15
16    //   console.log({ dd: window.location.href.replace(re, "") });
17    //   testURL.substring(0, testURL.indexOf('?'));
18    //   if (media_cat.value) {
19    const newUrl = updateQueryStringParameter(
20        split_paged_show(),
21        "media_cat",
22        media_cat.value
23    );
24    window.location.href = newUrl;
25    //   console.log({ newUrl });
26}
27let _initYear = false;
28function initYear(year = 0) {
29    if (_initYear) return;
30    _initYear = true;
31    console.log({ year });
32
33    year = +year;
34    const year_cat = document.querySelector("#year_cat");
35    const yearNow = new Date().getFullYear();
36    if (year_cat)
37        if (Array.from(year_cat).length > 1 && year_cat.firstChild) {
38            while (year_cat.lastElementChild) {
39                year_cat.removeChild(year_cat.lastElementChild);
40            }
41        }
42    for (let i = yearNow; i > yearNow - 10; i--) {
43        const option = document.createElement("option");
44        option.value = i;
45        option.innerHTML = i;
46        if (i == year) option.selected = true;
47        year_cat.appendChild(option);
48    }
49}
50function onYearChange() {              
51    const year_cat = document.querySelector("#year_cat");
52
53    const newUrl = updateQueryStringParameter(
54        split_paged_show(),
55        "year_cat",
56        year_cat.value
57    );
58    //console.log({ newUrl, ll: split_paged_show() });
59    window.location.href = newUrl;
60}
61function updateQueryStringParameter(uri, key, value) {
62    const re = new RegExp("([?&])" + key + "=.*?(&|$)", "i");
63    //   const re = new RegExp("([?&])" + key + "=.*?(&|$)", "i");
64    const separator = uri.indexOf("?") !== -1 ? "&" : "?";
65    if (uri.match(re)) {
66        return uri.replace(re, "$1" + key + "=" + value + "$2");
67    } else {
68        return uri + separator + key + "=" + value;
69    }
70}

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.