1$(function() { 2 var menuToggle = document.querySelector('.menu-toggle'); 3 var menu = document.getElementById('menu'); 4 var menuIcons = menuToggle.querySelectorAll('i'); 5 6 menuIcons[0].style.display = 'block'; 7 menuIcons[1].style.display = 'none'; 8 menuToggle.setAttribute('aria-expanded', 'false'); 9 10 menuToggle.addEventListener('click', function (event) { 11 event.stopPropagation(); 12 var isExpanded = menuToggle.getAttribute('aria-expanded') === 'true'; 13 14 menuToggle.setAttribute('aria-expanded', !isExpanded); 15 menu.classList.toggle('menu-visible'); 16 17 menuIcons[0].style.display = isExpanded ? 'block' : 'none'; 18 menuIcons[1].style.display = isExpanded ? 'none' : 'block'; 19 20 if (isExpanded) { 21 $('body').removeClass('menu-open'); 22 } else { 23 $('body').addClass('menu-open'); 24 } 25 }); 26 27 document.addEventListener('click', function(event) { 28 var isExpanded = menuToggle.getAttribute('aria-expanded') === 'true'; 29 if (isExpanded && !menu.contains(event.target) && !menuToggle.contains(event.target)) { 30 menuToggle.setAttribute('aria-expanded', 'false'); 31 menu.classList.remove('menu-visible'); 32 menuIcons[0].style.display = 'block'; 33 menuIcons[1].style.display = 'none'; 34 $('body').removeClass('menu-open'); 35 } 36 if (!searchBox.contains(event.target) && event.target !== searchIcon) { 37 if (searchBox.classList.contains('search-visible')) { 38 searchBox.classList.remove('search-visible'); 39 searchBox.classList.add('search-hidden'); 40 } 41 } 42 }); 43 44 $('.category-link').on('click', function(event) { 45 var submenu = $(this).next('.sub-menu'); 46 var plusIcon = $(this).find('i'); 47 48 if (submenu.length) { 49 event.preventDefault(); 50 var isVisible = submenu.attr('aria-hidden') === 'false'; 51 submenu.attr('aria-hidden', isVisible ? 'true' : 'false'); 52 53 if (isVisible) { 54 plusIcon.removeClass('fi-rr-minus-small').addClass('fi-rr-plus-small'); 55 } else { 56 plusIcon.removeClass('fi-rr-plus-small').addClass('fi-rr-minus-small'); 57 } 58 } 59 }); 60 61 var calendarSwiper = new Swiper('.calendar-swiper-container', { 62 loop: false, 63 navigation: { 64 nextEl: '.calendar-swiper-button-next', 65 prevEl: '.calendar-swiper-button-prev', 66 }, 67 breakpoints: { 68 768: { 69 slidesPerView: 2, 70 }, 71 767: { 72 slidesPerView: 1, 73 } 74 } 75 }); 76 77 $('.day-list').each(function() { 78 var month = $(this).attr('data-month'); 79 var day = $(this).attr('data-day'); 80 var color = $(this).attr('data-color'); 81
82 $('.makeshop-calendar' + month +' .day' + day).css({ 83 'background-color': color, 84 'color': '#fff', 85 'font-weight': 'bold', 86 }); 87 }); 88 89 $('.search-keyword, .search-price, .original-code').on('keydown', function(e) { 90 if (e.key === 'Enter') { 91 $('.search-url')[0].click(); 92 } 93 }); 94 95 WebFontConfig = { 96 google: { 97 families: ['Noto+Sans+JP:100,200,300,400,500,600,700,800,900', 'Outfit:100,200,300,400,500,600,700,800,900'] 98 } 99 }; 100 101 (function (d) { 102 var wf = d.createElement('script'), s = d.scripts[0]; 103 wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js'; 104 wf.async = true; 105 s.parentNode.insertBefore(wf, s); 106 })(document); 107 108 var searchIcon = document.getElementById('search-icon'); 109 var searchBox = document.querySelector('.search-box'); 110 111 searchIcon.addEventListener('click', function(event) { 112 event.stopPropagation(); 113 searchBox.classList.toggle('search-visible'); 114 searchBox.classList.toggle('search-hidden'); 115 if (searchBox.classList.contains('search-visible')) { 116 searchBox.querySelector('input').focus(); 117 } 118 }); 119}); 120 121function MakeShop_afterListCartEntry(data) { 122 if (data.result) { 123 $('.cart-badge').text(data.totalQuantity).show(); 124 125 const notification = $('.cart-notification'); 126 notification.stop(true, true).fadeIn(300); 127 128 setTimeout(() => { 129 notification.fadeOut(500); 130 }, 3000); 131 } else { 132 data.method.modal(data.error.message, function () { 133 if (data.systemCode) { 134 location.href = '/view/item/' + data.systemCode; 135 } 136 }); 137 } 138 return false; 139} 140 141function MakeShop_afterListFavoriteEntry(data) { 142 if (!data.result) { 143 data.method.modal(data.error.message); 144 return false; 145 } 146 147 $('a[href="' + data.source + '"]').addClass('hide').siblings('.favorite-on').removeClass('hide'); 148 149 return false; 150} 151 152function MakeShop_afterListFavoriteRemove(data) { 153 if (!data.result) { 154 data.method.modal(data.error.message); 155 return false; 156 } 157 158 $('a[href="' + data.source + '"]').addClass('hide').siblings('.favorite-off').removeClass('hide'); 159 160 return false; 161} 162 163$(function () { 164 const $pageTop = $("#js-pagetop"); 165 166 $(window).scroll(function () { 167 if ($(window).scrollTop() > 1) { 168 $pageTop.fadeIn(300).css('display', 'flex'); 169 } else { 170 $pageTop.fadeOut(300); 171 } 172 }); 173 174 $pageTop.click(function () { 175 $('html, body').animate({ scrollTop: 0 }, 300); 176 }); 177}); 178$(function () { 179 // Swiperã®è¨å® 180 var slideCount = document.querySelectorAll('.news-swiper-container .swiper-slide').length; 181 var swiper = new Swiper('.news-swiper-container', { 182 loop: slideCount.length >=2, 183 slidesPerView: 1, 184 spaceBetween: 10, 185 direction: 'vertical', 186 autoplay: { 187 delay: 3000, 188 }, 189 initialSlide: 0 190 }); 191 192 $('.custom-select').each(function () { 193 var $select = $(this); 194 195 var template = '<div class="' + $select.attr('class') + '">'; 196 template += '<span class="custom-select-trigger">' + $select.find('option:selected').text() + '</span>'; 197 template += '<div class="custom-option-wrapper">'; 198 199 $select.find('option').each(function () { 200 template += '<span class="custom-option" data-value="' + $(this).val() + '">' + $(this).html() + '</span>'; 201 }); 202 203 template += '</div></div>'; 204 205 $select.wrap('<div class="custom-select-wrapper"></div>').hide().after(template); 206 }); 207 208 $('.custom-option:first-of-type').hover( 209 function () { 210 $(this).parents('.custom-option-wrapper').addClass('option-hover'); 211 }, 212 function () { 213 $(this).parents('.custom-option-wrapper').removeClass('option-hover'); 214 } 215 ); 216 217 $('.custom-select-trigger').on('click', function (event) { 218 var $customSelect = $(this).parents('.custom-select'); 219 $('html').one('click', function () { 220 $customSelect.removeClass('opened'); 221 }); 222 $customSelect.toggleClass('opened'); 223 event.stopPropagation(); 224 });
225 226 $('.custom-option').on('click', function () { 227 var $customSelectWrapper = $(this).parents('.custom-select-wrapper'); 228 var selectedValue = $(this).data('value'); 229 230 $customSelectWrapper.find('select').val(selectedValue); 231 $customSelectWrapper.find('.custom-option').removeClass('selection'); 232 $(this).addClass('selection'); 233 234 $(this).parents('.custom-select').find('.custom-select-trigger').text($(this).text()); 235 236 $(this).parents('.custom-select').removeClass('opened'); 237 238 window.location.href = selectedValue; 239 }); 240});
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.