PageSourceSearch

https://centrumriviera.pl/wp-content/themes/starter-theme/assets/j…?ver=a3d1eb10bd46fbeaed742aec1cfaf2ce

js centrumriviera.pl collected 2026-09-26 16:44:45 UTC 10,384 bytes, 369 lines download raw bytes

1function headerLoad() {
2  console.log("headerLoad 7");
3
4  $(".navbar-nav .parent-opened, .navbar-nav .opened").removeClass(
5    "parent-opened opened"
6  );
7
8  $(".search-bar input").attr("tabindex", "-1");
9
10  if ($(window).width() < 1199) {
11    console.log("width < 1199");
12    $(
13      ".dropdown-menu a, .dropdown-menu button, .navbar-nav a, .navbar-nav button"
14    ).attr("tabindex", "-1");
15  } else {
16    console.log("width >= 1199");
17    $(
18      ".dropdown-menu a, .dropdown-menu button, .navbar-nav a, .navbar-nav button"
19    ).attr("tabindex", "0");
20  }
21}
22headerLoad();
23
24function headerResize() {
25  console.log("headerResize 7");
26  headerLoad();
27}
28
29setTimeout(() => {
30  $(window).trigger("resize");
31}, 1);
32
33$(window).on("resize", function () {
34  headerResize();
35});
36
37// Tab na ostatnim elemencie menu oraz Esc na submenu
38
39$(".dropdown-menu").each(function () {
40  const $dropdownMenu = $(this);
41  const $links = $(this).find("a:visible");
42  const $last = $links.last();
43
44  $(this).on("keydown", function (e) {
45    if ($(window).width() < 1199) {
46      if (
47        e.key === "Tab" &&
48        !e.shiftKey &&
49        document.activeElement === $last[0]
50      ) {
51        e.preventDefault();
52        $dropdownMenu.find(".p-droppy:first").focus();
53      }
54
55      if (e.key === "Escape" && !e.shiftKey) {
56        e.preventDefault();
57        e.stopPropagation();
58
59        console.log("dropdown-menu Escape");
60
61        $dropdownMenu.find(".p-droppy").click();
62      }
63    }
64  });
65});
66
67$(".navbar-nav").each(function () {
68  $(this).on("keydown", function (e) {
69    const $links = $(this).find("a:visible");
70    const $last = $links.last();
71
72    if ($(window).width() < 1199) {
73      if (
74        e.key === "Tab" &&
75        !e.shiftKey &&
76        document.activeElement === $last[0]
77      ) {
78        e.preventDefault();
79
80        console.log("last element");
81
82        $(".hamburger-wrapper").focus();
83      }
84
85      if (
86        e.key === "Escape" &&
87        !e.shiftKey &&
88        $(".hamburger-wrapper").hasClass("active")
89      ) {
90        e.preventDefault();
91
92        console.log("navbar-nav Escape");
93
94        $(".hamburger-wrapper").click().focus();
95      }
96    }
97  });
98});
99
100$(".languages-dropdown").each(function () {
101  const $links = $(this).find("a:visible");
102  const $last = $links.last();
103
104  $(this).on("keydown", function (e) {
105    // if ($(window).width() < 1199) {
106    if (e.key === "Tab" && !e.shiftKey && document.activeElement === $last[0]) {
107      e.preventDefault();
108
109      $(".dropdown-toggler").focus();
110    }
111
112    if (e.key === "Escape" && !e.shiftKey) {
113      e.preventDefault();
114
115      console.log("dropdown-toggler Escape");
116
117      $(".dropdown-toggler").click().focus();
118    }
119    // }
120  });
121});
122
123$(document).on("click", ".dropdown-toggler", function (e) {
124  e.preventDefault();
125  $(this).toggleClass("active");
126
127  if ($(this).hasClass("active")) {
128    $(this).siblings(".languages-dropdown").find("a").attr("tabindex", "0");
129  } else {
130    $(this).siblings(".languages-dropdown").find("a").attr("tabindex", "-1");
131  }
132});
133
134// Toggle wyszukiwarki po kliknieciu w lupkę
135$(document).on("click", ".searchBarLabel", function (e) {
136  e.preventDefault();
137  console.log("searchBarLabel clicked");
138
139  const params = new URLSearchParams(window.location.search);
140  const sectionName = params.get("infokiosk");
141
142  console.log("searchBarLabel sectionName: ", sectionName);
143
144  // Zamknięcie klawiatury na kliknięcie obok
145  if (!sectionName) {
146    if ($(window).width() > 1199) {
147      const barWidth = $("#searchBarInner").innerWidth() + 2;
148
149      console.log("searchBarLabel barWidth: ", barWidth);
150
151      // $("#searchBarWrapper").addClass("bar-collapsed");
152      $("#searchBarWrapper").toggleClass("bar-collapsed");
153
154      if ($("#searchBarWrapper").hasClass("bar-collapsed")) {
155        console.log("searchBarLabel hasClass bar-collapsed");
156
157        $("#searchBar").css("width", $("#searchBarWrapper").width() - barWidth);
158
159        $(".search-bar input").attr("tabindex", "0");
160      } else {
161        console.log("searchBarLabel NOT hasClass bar-collapsed");
162
163        $("#searchBar").css("width", 0);
164
165        $(".search-bar input").attr("tabindex", "-1");
166      }
167    } else {
168      $("#searchBarWrapper").addClass("bar-collapsed");
169    }
170  }
171});
172
173// Do każdego menu dropdown, jeżeli ma więcej niż 9 elementów to podział na 2 kolumny
174$(window).on("load", function () {
175  setTimeout(() => {
176    $(".dropdown-menu").each(function () {
177      if ($(this).find("li").length > 9) {
178        $(this).addClass("dropdown-multicolumn");
179      }
180    });
181  }, 1);
182});
183
184$(document).on("click", "#searchToggler", function () {
185  $("#searchBarWrapper").toggleClass("bar-collapsed");
186
187  if ($("#searchBarWrapper").hasClass("bar-collapsed")) {
188    console.log("searchBarLabel hasClass bar-collapsed");
189
190    $(".search-bar input").attr("tabindex", "0");
191  } else {
192    console.log("searchBarLabel NOT hasClass bar-collapsed");
193
194    $(".search-bar input").attr("tabindex", "-1");
195  }
196});
197
198// Otwarcie menu hamburger
199
200$(document).on("click", ".hamburger-wrapper", function () {
201  $(this).toggleClass("active");
202  $("body").toggleClass("nav-opened");
203
204  if ($(this).hasClass("active")) {
205    $(
206      ".navbar-nav .nav-item > a, .navbar-nav .nav-footer-social a, .navbar-nav .button-droppy"
207    ).attr("tabindex", "0");
208  } else {
209    headerLoad();
210  }
211});
212
213$(document).on("click", ".button-droppy", function () {
214  $(this).closest("ul").toggleClass("parent-opened");
215  // $(this).siblings("ul").toggleClass("opened");
216  $(this)
217    .siblings("ul")
218    .toggleClass("opened")
219    .find("a, button")
220    .attr("tabindex", "0");
221
222  $(this).siblings("ul").find(".p-droppy ").focus();
223});
224
225$(document).on("click", ".p-droppy", function () {
226  $(this).closest("ul").closest("ul").toggleClass("parent-opened");
227  // $(this).closest("ul").toggleClass("opened");
228  $(this)
229    .closest("ul")
230    .toggleClass("opened")
231    .find("a, button")
232    .attr("tabindex", "-1");
233
234  $(this).closest("ul").siblings(".button-droppy").focus();
235});
236
237$(window).on("load resize", function () {
238  let navHeight;
239  if ($(window).width() < 1199) {
240    navHeight = $(".top-bar").innerHeight() + $(".midbar").innerHeight();
241    $(".navbar").css("top", navHeight + "px");
242    $(".navbar").css("height", "calc(100vh - " + navHeight + "px)");
243  } else {
244    $(".navbar").css("top", "auto");
245    $(".navbar").css("height", "auto");
246  }
247});
248
249/* NAVBAR STICKY */
250$(window).on("load scroll resize", function () {
251  if ($(this).scrollTop() > 0) {
252    $("body").addClass("navbar-sticky");
253    $("main").css("padding-top", $("header").outerHeight());
254  } else {
255    $("body").removeClass("navbar-sticky");
256    $("main").css("padding-top", 0);
257  }
258});
259
260/* HIDE TOP NAVBAR */
261$(function () {
262  let navbarTop_ResizeFlag = false;
263  let navbarTop_ResizeTimeout;
264
265  let windowPositionTimeout;
266  let windowPosition = 0;
267
268  $(window).on("scroll resize", function (e) {
269    if (e.type == "resize") {
270      navbarTop_ResizeFlag = true;
271
272      clearTimeout(navbarTop_ResizeTimeout);
273
274      navbarTop_ResizeTimeout = setTimeout(function () {
275        navbarTop_ResizeFlag = false;
276      }, 1000);
277    }
278
279    if ($("body").hasClass("navbar-open") || navbarTop_ResizeFlag == true) {
280      return false;
281    }
282
283    let windowTop = $(this).scrollTop();
284
285    clearTimeout(windowPositionTimeout);
286
287    windowPositionTimeout = setTimeout(function () {
288      let navbarTopHeight = $(".top-bar").outerHeight();
289      // if($('#wpadminbar').length == 1){
290      //     navbarTopHeight = $('header').outerHeight() - parseInt($('#wpadminbar').outerHeight());
291      // }
292
293      let headerHeight = $("header").height();
294
295      // Góra ekranu
296      if (windowPosition >= windowTop) {
297        $("header").css("top", 0);
298        $("body")
299          .attr("data-navbartop", "visible")
300          .data("navbartop", "visible");
301        $("#searchKeyboard").css("top", "auto");
302        // $('#searchKeyboard').css('top', $('header').outerHeight());
303        headerHeight = $("header").height();
304        $("#searchKeyboard").css(
305          "height",
306          "calc(100% - " + headerHeight + "px)"
307        );
308      }
309
310      // Przewinięcie w dół
311      if (windowPosition < windowTop) {
312        $("header").css("top", navbarTopHeight * -1);
313        $("body").attr("data-navbartop", "hidden").data("navbartop", "hidden");
314        $("#searchKeyboard").css(
315          "top",
316          $("header").outerHeight() - navbarTopHeight
317        );
318        headerHeight = $("header").height() - navbarTopHeight;
319        $("#searchKeyboard").css(
320          "height",
321          "calc(100% - " + headerHeight + "px)"
322        );
323        $(".dropdown-toggler").removeClass("active");
324      }
325
326      windowPosition = windowTop;
327    }, 5);
328  });
329
330  let navbarTop_OriginHeight = $("header").outerHeight();
331
332  $(window).on("resize", function () {
333    if ($("body").hasClass("navbar-open")) {
334      return false;
335    }
336
337    let navbarTop_Height = $("header").outerHeight();
338
339    navbarTop_ResizeTimeout = setTimeout(function () {
340      if (navbarTop_OriginHeight != navbarTop_Height) {
341        $("header").css("top", 0);
342        navbarTop_OriginHeight = navbarTop_Height;
343      }
344    });
345  });
346});
347
348$(function () {
349  // Nasłuchiwanie kliknięcia na całą stronę
350  // $(document).on("click", function (event) {
351  //   let searchBarWrapper = $("#searchBarWrapper");
352  //   const params = new URLSearchParams(window.location.search);
353  //   const sectionName = params.get("infokiosk");
354  //   // Zamknięcie klawiatury na kliknięcie obok
355  //   if (!sectionName) {
356  //     if (
357  //       !$("#searchBarWrapper").is(event.target) &&
358  //       !$("#searchBar").is(event.target) &&
359  //       !$('[alt="Lupa"]').is(event.target) &&
360  //       !$(".keyboard-key").is(event.target)
361  //     ) {
362  //       if (searchBarWrapper.hasClass("bar-collapsed")) {
363  //         $("#searchBar").css("width", 0);
364  //         searchBarWrapper.removeClass("bar-collapsed");
365  //       }
366  //     }
367  //   }
368  // });
369});

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.