1$(function() { 2 // ãªã¼ãã¼ã¬ã¤(é»å¹)ãããã¯ã¼ã®å¤(bodyç´ä¸)ã¸ç§»åãããã¯ã¼å ã 㨠3 // z-index:100ã®ããã¯ã¼åºæºå ã§é»å¹ãåé¢ã«ä¹ããã¡ãã¥ã¼ãã¨æè»¢ããããã 4 $('#background-drawer-btn').appendTo('body'); 5 // ãã³ãã¼ã¬ã¼ã¡ãã¥ã¼ 6 $('#drawer-btn').on('click', function() { 7 $('#side-drawer').toggleClass('drawer-display'); 8 $('#background-drawer-btn').toggleClass('background-drawer-btn-none'); 9 $('.sidebar').toggleClass('open'); 10 $('body').toggleClass('sidebar-open'); 11 }); 12 // sidebar close on overlay click 13 $(document).on('click', function(e) { 14 if ($('.sidebar').hasClass('open')) { 15 if (!$(e.target).closest('.sidebar, #drawer-btn').length) { 16 $('.sidebar').removeClass('open'); 17 $('body').removeClass('sidebar-open'); 18 } 19 } 20 }); 21 22 $('#background-drawer-btn').on('click', function() { 23 if ($('#side-drawer').hasClass('drawer-display')) { 24 $('#side-drawer').removeClass('drawer-display'); 25 $('#background-drawer-btn').removeClass('background-drawer-btn-none'); 26 } 27 }); 28 29 // ãããã¼åºå® 30 $(window).scroll(function() { 31 if ($(window).scrollTop() > 100) { 32 $('header').addClass('fixed'); 33 } else { 34 $('header').removeClass('fixed'); 35 } 36 }); 37 38 // æ¤ç´¢ãã©ã¼ã 39 $('.side-search-keyword, .side-search-price').on('keypress', function(e) { 40 if (e.keyCode == 13) { 41 $('.side-search-btn')[0].click(); 42 } 43 }); 44 45 // Header search: trigger MakeShop .search-url on Enter 46 $(document).on('keypress', '.search-form .search-keyword', function(e) { 47 if (e.keyCode == 13) { 48 e.preventDefault(); 49 var u = $(this).closest('.search-form').find('.search-url')[0]; 50 if (u) u.click(); 51 } 52 }); 53 54 // ã«ã¬ã³ãã¼ 55 $('.day-list').each(function() { 56 var month = $(this).attr('data-month'); 57 var day = $(this).attr('data-day'); 58 var color = $(this).attr('data-color'); 59
60 $('.makeshop-calendar' + month +' .day' + day).css({ 61 'background-color': color, 62 'color': '#fff', 63 'font-weight': 'bold' 64 }); 65 }); 66 67 // ãããã¼ç¨ãã¥ã¼ã¹ 68 var headnews = new Swiper('.news-swiper-container', { 69 effect: 'slide', 70 direction: 'vertical', 71 autoplay: { 72 delay: 6000, 73 }, 74 loop: true, 75 speed: 600, 76 slidesPerView: 1 77 }); 78 79 WebFontConfig = { 80 google: { 81 families: ['Noto+Sans+JP', 'Lato', 'Raleway:300,700'] 82 } 83 }; 84 85 (function (d) { 86 var wf = d.createElement('script'), s = d.scripts[0]; 87 wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js'; 88 wf.async = true; 89 s.parentNode.insertBefore(wf, s); 90 })(document); 91 92 // ãµã¤ãã«ãã´ãª ã¢ã³ã¼ãã£ãªã³ï¼ã¤ãã³ãå§è²ï¼åå空éã§å¤éãã¤ã³ã鲿¢ï¼ 93 $(document).off('click.sideCat').on('click.sideCat', '.side-cat .side-category-toggle', function(e) { 94 e.preventDefault(); 95 var $item = $(this).closest('.side-category-item'); 96 $item.toggleClass('is-open'); 97 $(this).attr('aria-expanded', $item.hasClass('is-open') ? 'true' : 'false'); 98 }); 99 100 // æè¿ãã§ãã¯ããååã®Swiperåæåï¼å ¨ãã¼ã¸å ±éï¼ 101 if (typeof Swiper !== 'undefined' && $('.checked-item-swiper-container').length) { 102 // Swiper???????????????Îè?è£????ç¶£æ¡?ä¹?ç?? 103 $('.section.index-checked').css({ 104 'overflow': 'hidden', 105 'max-width': '100%', 106 'width': '100%', 107 'box-sizing': 'border-box' 108 }); 109 $('.section.index-checked .sec-body').css({ 110 'overflow': 'hidden', 111 'max-width': '100%', 112 'width': '100%', 113 'box-sizing': 'border-box' 114 }); 115 $('.checked-item-swiper-container').css({ 116 'overflow': 'hidden', 117 'max-width': '100%', 118 'width': '100%', 119 'box-sizing': 'border-box' 120 }); 121 122 var checkedSwiper = new Swiper('.checked-item-swiper-container', { 123 effect: 'slide', 124 spaceBetween: 14, 125 loop: false, 126 watchOverflow: true, 127 speed: 600, 128 slidesPerView: 5, 129 navigation: { 130 nextEl: '.checked-item-swiper-container .swiper-button-next', 131 prevEl: '.checked-item-swiper-container .swiper-button-prev' 132 }, 133 breakpoints: { 134 480: { slidesPerView: 2, spaceBetween: 10 }, 135 768: { slidesPerView: 2, spaceBetween: 10 }, 136 1100: { slidesPerView: 5, spaceBetween: 14 } 137 } 138 }); 139 $(window).on('load', function(){ 140 setTimeout(function(){ if (checkedSwiper && checkedSwiper.update) checkedSwiper.update(); }, 200); 141 setTimeout(function(){ if (checkedSwiper && checkedSwiper.update) checkedSwiper.update(); }, 800); 142 }); 143 } 144}); 145 // ãã©ãã«ã·ã¥ã¼ãã£ã³ã°ãã¹ã 146let answers = {}; 147let questionIndex = 1; 148 149function answer(question, value) { 150 answers[question] = value; 151 152 if (value === 'no') { 153 showResult(question); 154 } else { 155 // 次ã®è³ªåã¸é²ã 156 const currentQuestion = document.getElementById(`question${questionIndex}`); 157 currentQuestion.classList.add('hidden'); 158 159 questionIndex++; 160 161 const nextQuestion = document.getElementById(`question${questionIndex}`); 162 if (nextQuestion) { 163 nextQuestion.classList.remove('hidden'); 164 } else { 165 showResult(); 166 } 167 } 168} 169 170function showResult(question = null) { 171 let resultText = ''; 172 173 // ãNOããé¸ã°ããå ´åãç´ã¡ã«å¯¾å¿ãã解決çã表示 174 if (question === 'power') { 175 resultText = '黿ºãå ¥ããªãå ´åã¯ã黿ºã±ã¼ãã«ããã£ããæ¥ç¶ããã¦ããã確èªãã¦ãã ããã黿ºãã¿ã³ãé·æ¼ããã¦ã¿ã¦ãã ããã'; 176 } else if (question === 'cable') { 177 resultText = 'ã±ã¼ãã«ãæ£ããæ¥ç¶ããã¦ããªãå ´åã¯ãã±ã¼ãã«ã忥ç¶ãã¦ãã ããã'; 178 } else if (question === 'power_cable') { 179 resultText = '黿ºã±ã¼ãã«ãæ£ããæ¥ç¶ããã¦ããªãå ´åã¯ãã±ã¼ãã«ã忥ç¶ãã¦ãã ããã'; 180 } else if (question === 'volume') {
181 resultText = 'é³ãåºãªãå ´åã¯ãã¹ãã¼ã«ã¼ã®é³éã確èªãã¦ãã ããã'; 182 } else if (question === 'wifi') { 183 resultText = 'ã¤ã³ã¿ã¼ãããã«æ¥ç¶ã§ããªãå ´åã¯ãWi-Fiè¨å®ã確èªãã¦ãã ããã'; 184 } else if (question === 'printer_power') { 185 resultText = 'ããªã³ã¿ã¼ã®é»æºãå ¥ã£ã¦ããªãå ´åã¯ã黿ºãå ¥ãã¦ãã ããã'; 186 } else if (question === 'software_update') { 187 resultText = 'ã½ããã¦ã§ã¢ã®ã¢ãããã¼ããé©ç¨ããã¦ããªãå ´åã¯ãã¢ãããã¼ããè¡ã£ã¦ãã ããã'; 188 } else if (question === 'restart') { 189 resultText = 'ã³ã³ãã¥ã¼ã¿ãåèµ·åãã¦ã¿ã¦ãã ããã'; 190 } else if (question === 'fan') { 191 resultText = 'å·å´ãã¡ã³ãæ£å¸¸ã«åä½ãã¦ããªãå ´åã¯ããã¡ã³ã®ç¶æ ã確èªãã¦ãã ããã'; 192 } else if (question === 'slow') { 193 resultText = 'æè¿ã®ã¢ããªã±ã¼ã·ã§ã³ã®ã¤ã³ã¹ãã¼ã«ãæ´æ°ãåå ã§ãããã¤ã¹ãé ããªã£ã¦ããå¯è½æ§ãããã¾ãã'; 194 } else { 195 resultText = 'åé¡ã解決ããªãå ´åã¯ããµãã¼ãã«åãåããã¦ãã ããã'; 196 } 197 198 document.getElementById('result-text').textContent = resultText; 199 document.getElementById('result').classList.remove('hidden'); 200} 201 202 203// Global navigation dropdown 204(function(){ 205 var navItems = document.querySelectorAll('.gnav-has-dropdown'); 206 if (!navItems.length) return; 207 208 Array.prototype.forEach.call(navItems, function(item){ 209 var btn = item.querySelector('.gnav-link'); 210 if (!btn) return; 211 btn.addEventListener('click', function(e){ 212 e.preventDefault(); 213 var wasOpen = item.classList.contains('is-open'); 214 // close all 215 Array.prototype.forEach.call(navItems, function(i){ 216 i.classList.remove('is-open'); 217 var b = i.querySelector('.gnav-link'); 218 if (b) b.setAttribute('aria-expanded','false'); 219 }); 220 // toggle this one 221 if (!wasOpen) { 222 item.classList.add('is-open'); 223 btn.setAttribute('aria-expanded','true'); 224 } 225 }); 226 // hover for desktop 227 item.addEventListener('mouseenter', function(){ 228 if (window.matchMedia('(hover: hover) and (min-width: 1101px)').matches) { 229 Array.prototype.forEach.call(navItems, function(i){ 230 i.classList.remove('is-open'); 231 }); 232 item.classList.add('is-open'); 233 btn.setAttribute('aria-expanded','true'); 234 } 235 }); 236 item.addEventListener('mouseleave', function(){ 237 if (window.matchMedia('(hover: hover) and (min-width: 1101px)').matches) { 238 item.classList.remove('is-open'); 239 btn.setAttribute('aria-expanded','false'); 240 } 241 }); 242 }); 243 244 // close on outside click 245 document.addEventListener('click', function(e){ 246 if (!e.target.closest('.gnav-has-dropdown')) { 247 Array.prototype.forEach.call(navItems, function(i){ 248 i.classList.remove('is-open'); 249 var b = i.querySelector('.gnav-link'); 250 if (b) b.setAttribute('aria-expanded','false'); 251 }); 252 } 253 }); 254})(); 255 256 257/* ===== Top: slide-banner feature grid (list view of mainvisual banners) ===== */ 258(function(){ 259 function build(){ 260 var grid = document.getElementById('bannerFeatureGrid'); 261 if (!grid || grid.dataset.built) return; 262 var slider = document.querySelector('.hero-slider'); 263 if (!slider) return; 264 var imgs = slider.querySelectorAll('img'); 265 if (!imgs.length) return; 266 var seen = {}, added = 0; 267 Array.prototype.forEach.call(imgs, function(img){ 268 if (img.closest('.swiper-slide-duplicate')) return; 269 var src = img.getAttribute('src') || img.currentSrc || ''; 270 if (!src || seen[src]) return; 271 seen[src] = 1; 272 var a = img.closest('a'); 273 var href = a ? a.getAttribute('href') : ''; 274 var card = document.createElement(href ? 'a' : 'div'); 275 card.className = 'banner-feature-card'; 276 if (href) card.href = href; 277 var im = document.createElement('img'); 278 im.src = src; im.alt = img.getAttribute('alt') || ''; im.loading = 'lazy'; 279 card.appendChild(im); 280 grid.appendChild(card); 281 added++; 282 });
283 if (added) grid.dataset.built = '1'; 284 } 285 function init(){ 286 build(); 287 [500, 1200, 2500].forEach(function(t){ setTimeout(build, t); }); 288 setTimeout(function(){ 289 var grid = document.getElementById('bannerFeatureGrid'); 290 if (grid && !grid.children.length){ 291 var sec = grid.closest('.banner-feature'); 292 if (sec) sec.style.display = 'none'; 293 } 294 }, 3200); 295 } 296 if (document.readyState !== 'loading') init(); 297 else document.addEventListener('DOMContentLoaded', init); 298})(); 299 300$(function() { 301 var swiperOpts = { 302 effect: 'slide', 303 spaceBetween: 14, 304 loop: false, 305 watchOverflow: true, 306 speed: 600, 307 slidesPerView: 5, 308 breakpoints: { 309 480: { slidesPerView: 2, spaceBetween: 10 }, 310 768: { slidesPerView: 2, spaceBetween: 10 }, 311 1100: { slidesPerView: 5, spaceBetween: 14 } 312 } 313 }; 314 315 if ($('.new-item-swiper-container').length) { 316 new Swiper('.new-item-swiper-container', $.extend({}, swiperOpts, { 317 navigation: { 318 nextEl: '.new-item-swiper-container .swiper-button-next', 319 prevEl: '.new-item-swiper-container .swiper-button-prev' 320 } 321 })); 322 } 323 324 if ($('.ranking-item-swiper-container').length) { 325 new Swiper('.ranking-item-swiper-container', $.extend({}, swiperOpts, { 326 navigation: { 327 nextEl: '.ranking-item-swiper-container .swiper-button-next', 328 prevEl: '.ranking-item-swiper-container .swiper-button-prev' 329 } 330 })); 331 } 332 333 if ($('.sale-item-swiper-container').length) { 334 new Swiper('.sale-item-swiper-container', $.extend({}, swiperOpts, { 335 navigation: { 336 nextEl: '.sale-item-swiper-container .swiper-button-next', 337 prevEl: '.sale-item-swiper-container .swiper-button-prev' 338 } 339 })); 340 } 341 342 if ($('.checked-item-swiper-container').length) { 343 new Swiper('.checked-item-swiper-container', $.extend({}, swiperOpts, { 344 navigation: { 345 nextEl: '.checked-item-swiper-container .swiper-button-next', 346 prevEl: '.checked-item-swiper-container .swiper-button-prev' 347 } 348 })); 349 } 350 351 if ($('.review-item-swiper-container').length) { 352 new Swiper('.review-item-swiper-container', $.extend({}, swiperOpts, { 353 slidesPerView: 3, 354 spaceBetween: 12, 355 breakpoints: { 356 480: { slidesPerView: 1, spaceBetween: 10 }, 357 768: { slidesPerView: 2, spaceBetween: 10 }, 358 1100: { slidesPerView: 3, spaceBetween: 12 } 359 }, 360 navigation: { 361 nextEl: '.review-item-swiper-container .swiper-button-next', 362 prevEl: '.review-item-swiper-container .swiper-button-prev' 363 } 364 })); 365 } 366 367 // Swiper???è?è?é???ï¼?ã???æ¿?Ñ????????è¯ã?ç²æ??æ¨è³¢??????ç´?è¥?é´»??襲??帥?Ñ?????è?è??????å´???????????è??é? 368 $(window).on('load', function(){ 369 setTimeout(function(){ $(window).trigger('resize'); }, 100); 370 setTimeout(function(){ $(window).trigger('resize'); }, 500); 371 }); 372});
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.