1// Add data-delighter 2const element = document.querySelectorAll('body, .section--top, .block--keyvisual, .block--logo, .bg_mask, .header, .drawer__btn, .block--nav__login, .block--nav__sns, .list__more, .block--item, area--official, .area--fc, .section--news, .section--gallery, .section--profile, .section--banner, .section-tit, .section-tit__sub, .section--list, .section--detail, .list--information li, .list--contents, .list--contents li, .link--contents, .block--thumb, .list--item, .block--txt, .txt'); 3for (var i = 0; i < element.length; i++) { 4 element[i].setAttribute('data-delighter',''); 5} 6setTimeout( function (){ 7 const element = document.querySelectorAll('.block--scroll'); 8 for (var i = 0; i < element.length; i++) { 9 element[i].setAttribute('class','block--scroll delighter started ended scroll-visible'); 10 } 11},1500); 12 13 14window.onpageshow = function(event) { 15 if (event.persisted) { 16 document.querySelector('body').classList.remove('drawer-visible'); 17 document.querySelector('body').classList.add('browser_back'); 18 setTimeout( function (){ 19 document.querySelector('body').classList.remove('browser_back'); 20 },500); 21 } 22}; 23 24 25// Accordion 26document.addEventListener("DOMContentLoaded",() => { 27 const title = document.querySelectorAll('.list--support dt'); 28 for (let i = 0; i < title.length; i++){ 29 let titleEach = title[i]; 30 let content = titleEach.nextElementSibling; 31 titleEach.addEventListener('click', () => { 32 titleEach.classList.toggle('open'); 33 content.classList.toggle('open-contents'); 34 }); 35 } 36}); 37 38 39// Drawer 40document.querySelector('.drawer__btn').addEventListener('click', function(){ 41 document.querySelector('body').classList.toggle('drawer-visible'); 42}); 43const anchorlinks = document.querySelectorAll('.drawer a[href^="/#"]'); 44for (let i = 0; i < anchorlinks.length; i++) { 45 anchorlinks[i].addEventListener('click', function(){ 46 document.querySelector('body').classList.remove('drawer-visible'); 47}); 48} 49 50 51// Scroll down add class 52const myFunc = function(){ 53 const target = document.getElementsByClassName('block--scroll'); 54 const position = Math.floor(window.innerHeight * .40); 55 for (let i = 0; i < target.length; i++) { 56 let offsetTop = Math.floor(target[i].getBoundingClientRect().top); 57 let offsetBottom = Math.floor(target[i].getBoundingClientRect().bottom); 58 if (offsetTop < position) { 59 target[i].classList.remove('scrolling'); 60 } 61 if(offsetBottom < 200){ 62 target[i].classList.add('scrolling'); 63 } 64 } 65} 66window.addEventListener('scroll', myFunc, false); 67 68 69// Carousel 70const bodyHasClass = document.body.classList.contains('page--home'); 71if (bodyHasClass) { 72 window.addEventListener('DOMContentLoaded', function() { 73 var sliderImg = $(".list--bnr li").length; 74 const mediaQueryList = window.matchMedia('(min-width: 959px)'); 75 const listener = (event) => { 76 if (event.matches) { 77 if (sliderImg > 2) { 78 createSwiper(); 79 $('.section--banner').removeClass('no-carousel'); 80 } else { 81 $('.section--banner').addClass('no-carousel'); 82 createSwiper.destroy(); 83 } 84 } else { 85 if (sliderImg > 1) { 86 createSwiper(); 87 $('.section--banner').removeClass('no-carousel'); 88 } else { 89 $('.section--banner').addClass('no-carousel'); 90 createSwiper.destroy(); 91 } 92 } 93 }; 94 // ãªã¹ãã¼ç»é² 95 mediaQueryList.addEventListener("change", listener); 96 // åæåå¦ç 97 listener(mediaQueryList); 98 }); 99 const createSwiper = () =>{ 100 var swiper = new Swiper('.section--banner', { 101 effect: 'slide', 102 speed: 500, 103 pagination: { 104 el: '.swiper-pagination', 105 type: "fraction", 106 clickable: true, 107 /* 108 renderBullet: function (index, className) { 109 return `<div class="${className}"><div class="circle_inner">${index + 1}</div></div>` 110 }, 111 */ 112 /* 113 renderBullet: function (index, className) { 114 return `<div class="${className}"><div class="circle_inner">${index + 1}</div></div>` 115 }, 116 */ 117 /* 118 renderBullet: function (index, className) { 119 return ( 120 '<div class="' + 121 className + 122 ' progress-bar' + 123 '"><div class="progress-bar__inner">' + 124 //(Number(index) + 1) + 125 '</div></div>' 126 ) 127 }, 128 */ 129 }, 130 navigation: { 131 nextEl: '.swiper-button-next', 132 prevEl: '.swiper-button-prev', 133 }, 134 autoplay: false, 135 //autoplay: { 136 //delay: 3000, 137 //disableOnInteraction: false, 138 //autoplayDisableOnInteraction: false, 139 //}, 140 breakpoints: { 141 320: { 142 //spaceBetween: 20, 143 slidesPerView: 1.5, 144 centerInsufficientSlides: true, 145 }, 146 959: { 147 centeredSlides: true, 148 //spaceBetween: 60, 149 slidesPerView: 1.9, 150 }, 151 }, 152 }); 153 } 154 window.addEventListener('DOMContentLoaded', function() { 155 var sliderImg_video = $(".section--video .list--video li").length; 156 var swiper = new Swiper('.section--video .video-container', { 157 effect: 'slide', 158 speed: 500, 159 slidesPerView: 1.6, 160 spaceBetween: 20, 161 autoplay: false, 162 //autoplay: { 163 //delay: 3000, 164 //disableOnInteraction: true, 165 //autoplayDisableOnInteraction: false, 166 //}, 167 }); 168 const mediaQueryList = window.matchMedia('(min-width: 959px)'); 169 const listener = (event) => { 170 // ãªãµã¤ãºæã«è¡ãå¦ç 171 if (event.matches) { 172 if (sliderImg_video > 2) { 173 createSwiper(); 174 $('.section--video').removeClass('no-carousel'); 175 } else { 176 $('.section--video').addClass('no-carousel'); 177 createSwiper.destroy(); 178 } 179 } else { 180 if (sliderImg_video > 1) { 181 createSwiper(); 182 $('.section--video').removeClass('no-carousel'); 183 } else { 184 $('.section--video').addClass('no-carousel'); 185 createSwiper.destroy(); 186 } 187 } 188 }; 189 // ãªã¹ãã¼ç»é² 190 mediaQueryList.addEventListener("change", listener); 191 // åæåå¦ç 192 listener(mediaQueryList); 193 }); 194} 195 196// ã¢ã³ã«ã¼ãªã³ã¯ / Smooth scroll 197/* 198const headerHeight = document.querySelector('header').offsetHeight; 199document.querySelectorAll('a[href^="#"]').forEach(anchor => { 200 anchor.addEventListener('click', function (e) { 201 e.preventDefault(); 202 const href = anchor.getAttribute('href'); 203 const target = document.getElementById(href.replace('#', '')); 204 const targetPosition = target.getBoundingClientRect().top + window.pageYOffset - headerHeight; 205 window.scrollTo({ 206 top: targetPosition, 207 behavior: 'smooth' 208 }); 209 }); 210}); 211*/
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.