PageSourceSearch

https://ikkyosai.com/visitor/js/fv-load.js

js ikkyosai.com collected 2026-10-05 19:26:50 UTC 1,703 bytes, 52 lines download raw bytes

1// トップ(index.php)の FV を読み込む。
2// FV の HTML と JS は index.php の <link rel="preload"> で先に取りに行っている。
3// ここでの fetch はその preload を受け取るだけ(同じ URL なので二重には落とさない)。
4// 実行のタイミングは「#fv に入れてから fv_*.js → fv-anim.js を読んで動かす」。
5
6(() => {
7
8    const isSP = window.innerWidth < 768;
9
10    const fvFile = isSP
11        ? "./img/index/fv_sp.php"    // SVG をインライン化し、PNG を外に出した版
12        : "./img/index/fv_pc.php";   // PNG を外に出し、動かす単位ごとに SVG を分けた版
13
14    const jsFile = isSP
15        ? "./js/fv_sp.js"
16        : "./js/fv_pc.js";
17
18
19    function loadScript(src) {
20        return new Promise((resolve, reject) => {
21            const script = document.createElement("script");
22            script.src = src;
23            script.onload = resolve;
24            script.onerror = reject;
25            document.body.appendChild(script);
26        });
27    }
28
29
30    // FV の HTML(preload 済みのものが返る)
31    const htmlReady = fetch(fvFile).then(response => response.text());
32
33
34    document.addEventListener("DOMContentLoaded", () => {
35
36        htmlReady.then(html => {
37
38            document.getElementById("fv").innerHTML = html;
39
40            // fv_*.js(ロゴの回転・ホバー)の後に fv-anim.js(playFVAnimation の差し替え)を読む
41            loadScript(jsFile)
42                .then(() => loadScript("./js/fv-anim.js"))
43                .then(() => {
44                    playFVAnimation();
45                    setupLogoHover();
46                });
47
48        });
49
50    });
51
52})();

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.