PageSourceSearch

https://www.raiffeisen.hu/o/raiffeisen-theme/js/components/Navigation.js?minifierType=js&t=1790242628779

js raiffeisen.hu collected 2026-09-24 09:38:37 UTC 4,873 bytes, 146 lines download raw bytes

1/*1786086148000*/
2("use scrict");
3//raiffeisen navigation
4let raiffeisenNavigation = (() => {
5  const destroy = () => {
6    const navigation = document.querySelector("#navigation");
7    const navigationButton = document.querySelector(".navigation-button i");
8    const navigationWrapper = navigation?.querySelector(".navigation-wrapper");
9    const blurPage = document.querySelector("#blur-page");
10
11    if (navigationWrapper) {
12      navigationWrapper.classList.remove("d-block");
13    }
14    if (navigationButton) {
15      navigationButton.classList.add("icon-reorder");
16    }
17    if (blurPage) {
18      blurPage.classList.remove("d-block");
19    }
20  };
21
22  const app = () => {
23    const navigationButton = document.querySelector(".navigation-button i");
24    const navigation = document.querySelector("#navigation");
25    const navigationWrapper = navigation?.querySelector(".navigation-wrapper");
26    const blurPage = document.querySelector("#blur-page");
27
28    if (navigationButton && navigationWrapper) {
29      navigationButton.addEventListener("click", () => {
30        navigationButton.classList.toggle("icon-reorder");
31        const navWrapperShown = navigationWrapper.classList.toggle("d-block");
32        if (navWrapperShown) {
33          raiffeisenDeviceSearch?.destroy();
34        }
35
36        blurPage?.classList.toggle("d-block", navWrapperShown);
37      });
38
39      window.addEventListener("resize", () => {
40        const navWrapperShown = navigationWrapper.classList.contains("d-block");
41
42        if (navWrapperShown) {
43          if (window.matchMedia("(min-width: 768px)").matches) {
44            blurPage.classList.remove("d-block");
45          } else {
46            blurPage.classList.add("d-block");
47          }
48        }
49      });
50
51      const setHeaderHeight = () => {
52        if (window.matchMedia("(max-width: 768px)").matches) {
53          navigationWrapper.style.setProperty(
54            "--navigation-height",
55            `${
56              document.querySelector("#banner").getBoundingClientRect().bottom
57            }px`
58          );
59        }
60      };
61
62      setHeaderHeight();
63      window.addEventListener("resize", () => setHeaderHeight());
64    }
65
66    //device navigation
67    const deviceNavigationItemWithSubmenu = navigation?.querySelectorAll(
68      ".device-navigation-item-with-submenu"
69    );
70
71    if (deviceNavigationItemWithSubmenu) {
72      deviceNavigationItemWithSubmenu.forEach((element) => {
73        element.addEventListener("click", (event) => {
74          event.currentTarget
75            .closest(".device-navigation-item-li")
76            .classList.toggle("submenu-active");
77          event.currentTarget
78            .closest(".navigation-wrapper")
79            .classList.toggle("device-submenu-active");
80        });
81      });
82    }
83
84    if (navigationWrapper) {
85      moveItems(navigationWrapper.querySelector("ul"));
86    }
87  };
88
89  const moveItems = (navMenu) => {
90    if (navMenu) {
91      const internetBankWrapper = document.querySelector(
92        ".internetbank-wrapper"
93      );
94      if (internetBankWrapper) {
95        internetBankWrapper.querySelectorAll("ul li").forEach((item) => {
96          let li = document.createElement("li");
97          li.classList.add("mobile-menu-element");
98          li.innerHTML = item.innerHTML;
99          navMenu.append(li);
100        });
101      }
102
103      const videoBankWrapper = document.querySelector(".videobank-wrapper");
104      const videoBankButton = videoBankWrapper?.querySelector("a");
105      if (videoBankButton) {
106        let a = document.createElement("a");
107        a.innerHTML = videoBankButton.innerHTML;
108        a.href = videoBankButton.href;
109        let li = document.createElement("li");
110        li.classList.add("mobile-menu-element");
111        li.append(a);
112        navMenu.append(li);
113      }
114
115      const contactWrapper = document.querySelector(".contact-wrapper");
116      if (contactWrapper) {
117        contactWrapper.querySelectorAll("li").forEach((item) => {
118          let li = document.createElement("li");
119          li.classList.add("mobile-menu-element");
120          li.innerHTML = item.innerHTML;
121          navMenu.append(li);
122        });
123      }
124
125      const headerLang = document.querySelector(".header-lang");
126      if (headerLang) {
127        let i = document.createElement("i");
128        i.classList.add("icon-globe");
129        let a = document.createElement("a");
130        a.href = headerLang.getAttribute("href");
131        a.append(i);
132        a.append(headerLang.getAttribute("title"));
133        a.classList.add("d-flex");
134        let li = document.createElement("li");
135        li.classList.add("mobile-menu-element");
136        li.append(a);
137        navMenu.append(li);
138      }
139    }
140  };
141
142  return {
143    app: app,
144    destroy: destroy,
145  };
146})();

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.