1import { BASE_PATH, IS_SMARTPHONE_CHECK } from "./consts/index.js"; 2import { headerInclude, footerInclude } from "./libs/includeHtml.js"; 3import { drawerMenu } from "./libs/drawerMenu.js"; 4import { replaceImg } from "./libs/replaceImg.js"; 5import { slideToggle } from "./libs/slideToggle.js"; 6import { tabSwitch } from "./libs/tabSwitch.js"; 7import { sideIncludeSwitch } from "./libs/sideInclude.js"; 8import { swipeTable } from "./libs/swipeTable.js"; 9import { topicsNew } from "./libs/topicsNew.js"; 10import { etxAddQueryParam } from "./libs/etxAddQueryParam.js"; 11import { addCssFilter } from "./libs/addCssFilter.js"; 12 13console.log(BASE_PATH); 14 15/*============================ 16ãªãªã¸ãã« 17============================*/ 18 19//åæå¦ç 20async function init() { 21 await headerInclude(BASE_PATH); 22 await footerInclude(BASE_PATH); 23 await sideIncludeSwitch(BASE_PATH); 24} 25//åæå¦çãå®äºãããã»ã»ã» 26init() 27 .then(() => { 28 addCssFilter(".js-cssFilter"); 29 // ããããã¼ã¸ããã¼ 30 swiper(".banner"); 31 topicsNew(); 32 //ã¡ãã¥ã¼ 33 drawerMenu("#js-drawerMenu", [".h-sitemap"]); 34 35 swipeTable(".main-inner"); 36 37 etxAddQueryParam(); 38 39 if (IS_SMARTPHONE_CHECK) { 40 /* ============================ 41 ã¹ããã®ã¿æå¹ãªfunction 42 ============================*/ 43 //ç»åç½®æ 44 replaceImg(); 45 //ããã¿ã¼ã®ã¢ã³ã¼ãã£ãªã³ã¡ãã¥ã¼ 46 slideToggle(".js-slideToggle"); 47 } else { 48 /* ============================ 49 PCã®ã¿æå¹ãªfunction 50 ============================*/ 51 //ããããã¼ã¸ã¿ãåãæ¿ã 52 // tabSwitch(".js-tab"); 53 } 54 }) 55 .catch((e) => { 56 console.log("Error:", e); 57 }); 58 59/*============================ 60å¤é¨ã©ã¤ãã©ãª 61============================*/ 62 63//Swiper 64function swiper(target) { 65 const $target = document.querySelector(target); 66 if (!$target) { 67 return; 68 } else { 69 new Swiper(target, { 70 loop: true, 71 spaceBetween: 28, 72 slidesPerView: 1, 73 navigation: { 74 nextEl: ".swiper-button-next", 75 prevEl: ".swiper-button-prev", 76 }, 77 autoplay: { 78 delay: 5000, 79 }, 80 breakpoints: { 81 // 768px以ä¸ã®å ´å 82 768: { 83 slidesPerView: 3, 84 }, 85 }, 86 }); 87 } 88}
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.