PageSourceSearch

https://heaven-burns-red.com/assets/js/async.js?hash=4172048

js heaven-burns-red.com collected 2026-09-24 09:15:24 UTC 6,046 bytes, 183 lines download raw bytes

1const replaceHeadTags = target => {
2    const head = document.head;
3    const targetHead = target.html.match(/<head[^>]*>([\s\S.]*)<\/head>/i)[0];
4    const newPageHead = document.createElement('head');
5    newPageHead.innerHTML = targetHead;
6    const removeHeadTags = [
7        "meta[name='keywords']",
8        "meta[name='description']",
9        "meta[property^='fb']",
10        "meta[property^='og']",
11        "meta[name^='twitter']",
12        "meta[name='robots']",
13        'meta[itemprop]',
14        'link[itemprop]',
15        "link[rel='prev']",
16        "link[rel='next']",
17        "link[rel='canonical']",
18        "link[rel='stylesheet']",
19    ].join(',');
20    const headTags = [...head.querySelectorAll(removeHeadTags)];
21    headTags.forEach(item => {
22        head.removeChild(item);
23    });
24    const newHeadTags = [...newPageHead.querySelectorAll(removeHeadTags)];
25    newHeadTags.forEach(item => {
26        head.appendChild(item);
27    });
28
29};
30const visible = () => {
31    $("link[href*='/assets/']").on("load", function () {
32        window.setTimeout(function () {
33            $("body").removeClass("preload");
34        }, 100);
35        window.setTimeout(function () {
36            enterStyle();
37            $("body").css("opacity", "1");
38            $(".header-nav_common").css("opacity", "");
39        }, 100);
40    });
41
42};
43
44// const replaceJs = target => {
45//     const script = $("#switchjs");
46//     const targetScripts = target.html.match(/<script[^>]+?\/>|<script(.|\s)*?\/script>/gi);
47//     const targetLength = targetScripts.length -2;
48//     const targetScript = targetScripts[targetLength];
49//     const targetSrc = targetScript.match(/src="([^"]*)"/i);
50//     return targetSrc[1];
51// };
52
53const enterStyle = () => {
54    $(".anim-ld").addClass("animated");
55};
56
57function delay(n) {
58    n = n || 2000;
59    return new Promise((done) => {
60        setTimeout(() => {
61            done();
62        }, n);
63    });
64}
65
66const mvSlider = (type) => {
67
68    const targetElm = $(".mv-ui_current");
69    const targetElm02 = $(".mv-ui_all");
70
71    const mv = new Swiper('.mv-list', {
72        speed: 800,
73        effect: 'fade',
74        loop: true,
75        centeredSlides: false,
76        // grabCursor: true,
77        slidesPerView: 1,
78        shortSwipes: false,
79        // watchOverflow: true,
80        // direction: 'horizontal',
81        autoplayDisableOnInteraction: false,
82        navigation: {
83            nextEl: '.mv-ui_next',
84            prevEl: '.mv-ui_prev',
85        },
86        fadeEffect: {
87            crossFade: true
88        },
89        autoplay: {
90            delay: 6000,
91            disableOnInteraction: false,
92        },
93        on: {
94            init: function (e) {
95                targetElm.text("1");
96                targetElm02.text(e.slides.length - e.loopedSlides * 2);
97                $(".mv-wrapper a[data-swiper-slide-index='0']").addClass("preactive");
98                // $(".mv-wrapper a[data-swiper-slide-index='0']").addClass("active");
99            },
100        }
101    });
102    mv.on('transitionStart', function () {
103        targetElm.addClass("transition");
104        // $(".mv-wrapper a[data-swiper-slide-index='" + mv.realIndex + "']").removeClass("active");
105    });
106    mv.on('transitionEnd', function () {
107        let currentIdx = mv.realIndex + 1;
108        targetElm.text(currentIdx);
109        targetElm.removeClass("transition");
110        $(".mv-wrapper a[data-swiper-slide-index='0']").removeClass("preactive");
111        // $(".mv-wrapper a[data-swiper-slide-index='"+mv.realIndex+"']").addClass("active");
112    });
113    // barba.hooks.enter((data) => {
114    //   mv.destroy();
115    //   console.log()
116    // });
117};
118
119
120
121barba.init({
122    sync: true,
123    transitions: [
124        {
125            async leave(data) {
126                const scrollElem = document.scrollingElement || document.documentElement;
127                let currentPos = scrollElem.scrollTop;
128                $("body").css("position", "fixed").css("top", -currentPos);
129                const done = this.async();
130                $("body").css("opacity", "0");
131                $("body").removeClass("preload");
132                $("body script:last").remove();
133                await delay(300);
134
135                done();
136            },
137            beforeEnter({ next }) {
138                $(".header-nav_common").css("opacity", "0");
139                replaceHeadTags(next);
140                $("body").css("position", "").css("top", "");
141                visible();
142                ScrollTrigger.refresh(true);
143            },
144            async enter(data) {
145                $("body").addClass("preload");
146                await delay(150);
147
148                $('.st-MusicPlayer button.navigation').removeClass('show');
149                $('.st-MusicPlayer button.navigation .nav_hide').fadeOut(50);
150                $(".header-hamburger").removeClass("invisible").removeClass("playeron");
151                if ($('.mv-list')[0]) {
152                    mvSlider();
153                }
154                setTimeout(function () {
155                    $('.st-MusicPlayer button.navigation .nav_show').fadeIn(150);
156                    $('.st-MusicPlayer_Navigation').removeClass('show');
157                    const scrollElem = document.scrollingElement || document.documentElement;
158                    scrollElem.scrollTop = 0;
159
160                }, 100);
161            },
162            async after(data) {
163                let margin = 0;
164                ScrollTrigger.refresh(true);
165                if (matchMedia('(max-width: 768px)').matches) {
166                    margin = 150;
167                } else {
168                    margin = 300;
169                }
170                $(".anim-sc").each(function (i, node) {
171                    gsap.to(node, {
172                        scrollTrigger: {
173                        trigger: node,
174                        start: 'top bottom-='+margin,
175                        toggleClass: { targets: node, className: "animated" },
176                        once: true
177                        }
178                    });
179                });
180            },
181        }
182    ],
183});

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.