PageSourceSearch

https://godlike.host/wp-content/themes/godlike/js/blog/main.min.js?ver=1.040

js godlike.host collected 2026-10-03 20:17:44 UTC 8,442 bytes, 168 lines download raw bytes

1const body = document.querySelector("body"),
2    html = document.querySelector("html"),
3    burger = document.querySelector(".header__burger"),
4    header = document.querySelector(".site-header");
5let windowSize = window.innerWidth;
6body.addEventListener("click", (function(e) {
7    function t(t) {
8        return e.target.closest(t)
9    }
10    t(".header__burger") && header.classList.add("mobile-nav-active"), (t(".header__mobile-nav--close button") || t(".header__mobile-nav--bg")) && header.classList.remove("mobile-nav-active");
11    let o = t(".btn-to-scroll");
12    if (o) {
13        let t;
14        e.preventDefault(), o.classList.contains("_on-top") ? body.scrollIntoView({
15            block: "start",
16            behavior: "smooth"
17        }) : (t = document.querySelector(o.getAttribute("href")), t.scrollIntoView({
18            block: "start",
19            behavior: "smooth"
20        }))
21    }
22    const r = t(".anchor-link");
23    r && history.pushState("", "", r.getAttribute("href"));
24    const i = t(".select-selected"),
25        s = document.querySelectorAll(".select._active");
26    if (i) {
27        const e = i.closest(".select");
28        e.classList.contains("_active") ? e.classList.remove("_active") : (s.forEach(e => {
29            e.classList.remove("_active")
30        }), e.classList.add("_active"))
31    } else s.length && !t(".select") && s.forEach(e => {
32        e.classList.remove("_active")
33    });
34    const n = t(".rating__star");
35    if (n) {
36        const e = n.closest(".rating").querySelector(".rating__star._active");
37        e && e.classList.remove("_active"), n.classList.add("_active")
38    }
39    const a = t(".games-nav__current .games-nav__item");
40    if (a) {
41        const t = a.closest(".games-nav-mob");
42        e.preventDefault();
43        const o = t.querySelector(".games-nav__list");
44        if (t.classList.contains("_active")) {
45            o.style.transitionProperty = "height";
46            const e = o.offsetHeight;
47            o.style.height = e + "px", o.addEventListener("transitionend", (function e() {
48                o.style.removeProperty("transition-property"), o.style.display = "none", o.style.removeProperty("height"), t.classList.remove("_animating"), o.removeEventListener("transitionend", e)
49            })), setTimeout(() => {
50                o.style.height = 0, t.classList.remove("_active")
51            }, 0)
52        } else {
53            t.classList.add("_active"), o.style.height = "auto", o.style.display = "flex";
54            const e = o.offsetHeight;
55            o.style.height = 0, o.style.transitionProperty = "height", o.addEventListener("transitionend", (function e() {
56                o.style.removeProperty("transition-property"), t.classList.remove("_animating"), o.removeEventListener("transitionend", e)
57            })), setTimeout(() => {
58                o.style.height = e + "px"
59            }, 0)
60        }
61    }
62    const l = t(".footer__nav--target");
63    if (l && windowSize < 768) {
64        const e = l.closest(".footer__nav--block"),
65            t = e.querySelector("ul");
66        e.classList.contains("_animating") || (e.classList.toggle("_active"), e.classList.add("_animating"), e.classList.contains("_active") ? slideDown(t) : slideUp(t), setTimeout(() => {
67            e.classList.remove("_animating")
68        }, 500))
69    }
70}));
71const stickyBlock = new Sticky("[data-sticky-container] .sticky");
72let resizeCheck = {};
73
74function resizeCheckFunc(e, t, o) {
75    windowSize <= e && (1 == resizeCheck[String(e)] || null == resizeCheck[String(e)]) && 0 != resizeCheck[String(e)] && (resizeCheck[String(e)] = !1, o()), windowSize >= e && (0 == resizeCheck[String(e)] || null == resizeCheck[String(e)]) && 1 != resizeCheck[String(e)] && (resizeCheck[String(e)] = !0, t())
76}
77const gamesNavWrapper = document.querySelector(".games-nav__wrapper"),
78    gamesNavContainer = document.querySelector(".games-nav__sticky-container"),
79    gamesNavMobContainer = document.querySelector(".games-nav-mob");
80
81function resize() {
82    windowSize = window.innerWidth, html.style.setProperty("--height-header", header.offsetHeight + "px"), resizeCheckFunc(992, (function() {
83        gamesNavContainer && gamesNavWrapper && gamesNavContainer.append(gamesNavWrapper)
84    }), (function() {
85        gamesNavMobContainer && gamesNavWrapper && gamesNavMobContainer.append(gamesNavWrapper)
86    }))
87}
88resize(), window.onresize = resize;
89let lastNewsSlider = new Swiper(".last-news__slider", {
90    spaceBetween: 20,
91    slidesPerView: 2,
92    reverseDirection: !0,
93    navigation: {
94        nextEl: ".swiper-button-next",
95        prevEl: ".swiper-button-prev"
96    },
97    breakpoints: {
98        1550: {
99            slidesPerView: 4
100        },
101        1200: {
102            slidesPerView: 3
103        },
104        350: {
105            spaceBetween: 10
106        }
107    }
108});
109const scrollAnchorContainer = document.querySelectorAll(".scroll-anchor-container");
110
111function scroll() {
112    scrollAnchorContainer.forEach(e => {
113        const t = e.querySelectorAll("[id]");
114        document.querySelectorAll(e.dataset.nav).forEach(o => {
115            let r = !0;
116            for (let i = t.length - 1; i >= 0; i--)
117                if (t[i].getBoundingClientRect().top < 5 && Math.abs(e.getBoundingClientRect().top) < e.offsetHeight) {
118                    const e = o.querySelector(`.anchor-link[href="#${t[i].getAttribute("id")}"]`);
119                    if (r = !1, e) {
120                        const r = o.querySelector(".anchor-link._active");
121                        r ? r.getAttribute("href") != "#" + t[i].getAttribute("id") && (r.classList.remove("_active"), e.classList.add("_active")) : e.classList.add("_active")
122                    }
123                    break
124                }
125            if (r) {
126                const e = o.querySelector(".anchor-link._active");
127                e && e.classList.remove("_active")
128            }
129        })
130    })
131}
132
133function slideUp(e, t = 500) {
134    e.style.transitionProperty = "height, margin, padding", e.style.transitionDuration = t + "ms", e.style.boxSizing = "border-box", e.style.height = e.offsetHeight + "px", e.offsetHeight, e.style.overflow = "hidden", e.style.height = 0, e.style.paddingTop = 0, e.style.paddingBottom = 0, e.style.marginTop = 0, e.style.marginBottom = 0, window.setTimeout(() => {
135        e.style.display = "none", e.style.removeProperty("height"), e.style.removeProperty("padding-top"), e.style.removeProperty("padding-bottom"), e.style.removeProperty("margin-top"), e.style.removeProperty("margin-bottom"), e.style.removeProperty("overflow"), e.style.removeProperty("transition-duration"), e.style.removeProperty("transition-property")
136    }, t)
137}
138
139function slideDown(e, t = 500) {
140    e.style.removeProperty("display");
141    let o = window.getComputedStyle(e).display;
142    "none" === o && (o = "block"), e.style.display = o;
143    let r = e.offsetHeight;
144    e.style.overflow = "hidden", e.style.height = 0, e.style.paddingTop = 0, e.style.paddingBottom = 0, e.style.marginTop = 0, e.style.marginBottom = 0, e.offsetHeight, e.style.boxSizing = "border-box", e.style.transitionProperty = "height, margin, padding", e.style.transitionDuration = t + "ms", e.style.height = r + "px", e.style.removeProperty("padding-top"), e.style.removeProperty("padding-bottom"), e.style.removeProperty("margin-top"), e.style.removeProperty("margin-bottom"), window.setTimeout(() => {
145        e.style.removeProperty("height"), e.style.removeProperty("overflow"), e.style.removeProperty("transition-duration"), e.style.removeProperty("transition-property")
146    }, t)
147}
148scrollAnchorContainer.forEach(e => {
149    const t = e.querySelectorAll("[id]");
150    document.querySelectorAll(e.dataset.nav).forEach(e => {
151        t.forEach(e => {
152            e.insertAdjacentHTML("beforeend", `<a class="hash-link" href="#${e.getAttribute("id")}">#</a>`)
153        })
154    })
155}), scroll(), window.addEventListener("scroll", function () { if (window.__gdlScrollTick) return; window.__gdlScrollTick = !0; requestAnimationFrame(function () { scroll(); window.__gdlScrollTick = !1 }) }, { passive: !0 });
156
157document.addEventListener("DOMContentLoaded", function() {
158    setTimeout(() => {
159        if (window.location.hash) {
160            const anchor = window.location.hash.substring(1);
161
162            var element = document.getElementById(anchor);
163            if (element) {
164                element.scrollIntoView({ behavior: 'smooth' });
165            }
166        }
167    }, 1000);
168});

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.