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.