PageSourceSearch

https://arcadia-company.jp/view/asset/user-1-1-6-31fdc5f2a0b63fea6ff2b32c4c09dad6.js

js arcadia-company.jp collected 2026-10-08 06:18:01 UTC 8,620 bytes, 339 lines download raw bytes

1$(function () {
2
3    /* ===========================
4       メニュー
5    =========================== */
6
7    var menuToggle = document.querySelector('.menu-toggle');
8    var menu = document.getElementById('menu');
9
10    if (menuToggle && menu) {
11
12        var menuIcons = menuToggle.querySelectorAll('i');
13
14        if (menuIcons.length >= 2) {
15            menuIcons[0].style.display = 'block';
16            menuIcons[1].style.display = 'none';
17        }
18
19        menuToggle.setAttribute('aria-expanded', 'false');
20
21        menuToggle.addEventListener('click', function (event) {
22            event.stopPropagation();
23
24            var isExpanded = menuToggle.getAttribute('aria-expanded') === 'true';
25
26            menuToggle.setAttribute('aria-expanded', !isExpanded);
27            menu.classList.toggle('menu-visible');
28
29            if (menuIcons.length >= 2) {
30                menuIcons[0].style.display = isExpanded ? 'block' : 'none';
31                menuIcons[1].style.display = isExpanded ? 'none' : 'block';
32            }
33
34            $('body').toggleClass('menu-open', !isExpanded);
35        });
36
37        document.addEventListener('click', function (event) {
38
39            var isExpanded = menuToggle.getAttribute('aria-expanded') === 'true';
40
41            if (
42                isExpanded &&
43                !menu.contains(event.target) &&
44                !menuToggle.contains(event.target)
45            ) {
46
47                menuToggle.setAttribute('aria-expanded', 'false');
48                menu.classList.remove('menu-visible');
49
50                if (menuIcons.length >= 2) {
51                    menuIcons[0].style.display = 'block';
52                    menuIcons[1].style.display = 'none';
53                }
54
55                $('body').removeClass('menu-open');
56            }
57
58        });
59
60    }
61
62    /* ===========================
63       カテゴリー
64    =========================== */
65
66    $('.category-link').on('click', function (event) {
67
68        var submenu = $(this).next('.sub-menu');
69        var plusIcon = $(this).find('i');
70
71        if (!submenu.length) return;
72
73        event.preventDefault();
74
75        var isVisible = submenu.attr('aria-hidden') === 'false';
76
77        submenu.attr('aria-hidden', isVisible ? 'true' : 'false');
78
79        plusIcon
80            .toggleClass('fi-rr-plus-small', isVisible)
81            .toggleClass('fi-rr-minus-small', !isVisible);
82
83    });
84
85    /* ===========================
86       カレンダー
87    =========================== */
88
89    if ($('.calendar-swiper-container').length && typeof Swiper !== 'undefined') {
90
91        new Swiper('.calendar-swiper-container', {
92            loop: false,
93            navigation: {
94                nextEl: '.calendar-swiper-button-next',
95                prevEl: '.calendar-swiper-button-prev'
96            },
97            breakpoints: {
98                768: {
99                    slidesPerView: 2
100                },
101                767: {
102                    slidesPerView: 1
103                }
104            }
105        });
106
107    }
108
109    $('.day-list').each(function () {
110
111        var month = $(this).data('month');
112        var day = $(this).data('day');
113        var color = $(this).data('color');
114
115        $('.makeshop-calendar' + month + ' .day' + day).css({
116            backgroundColor: color,
117            color: '#fff',
118            fontWeight: 'bold'
119        });
120
121    });
122
123    /* ===========================
124       検索
125    =========================== */
126
127    $('.search-keyword, .search-price, .original-code').on('keydown', function (e) {
128
129        if (e.key === 'Enter') {
130
131            var button = $('.search-url')[0];
132
133            if (button) {
134                button.click();
135            }
136
137        }
138
139    });
140
141    var searchIcon = document.getElementById('search-icon');
142    var searchBox = document.querySelector('.search-box');
143
144    if (searchIcon && searchBox) {
145
146        searchIcon.addEventListener('click', function (event) {
147
148            event.stopPropagation();
149
150            searchBox.classList.toggle('search-visible');
151            searchBox.classList.toggle('search-hidden');
152
153            if (searchBox.classList.contains('search-visible')) {
154
155                var input = searchBox.querySelector('input');
156
157                if (input) {
158                    input.focus();
159                }
160
161            }
162
163        });
164
165        document.addEventListener('click', function (event) {
166
167            if (
168                !searchBox.contains(event.target) &&
169                event.target !== searchIcon
170            ) {
171
172                if (searchBox.classList.contains('search-visible')) {
173
174                    searchBox.classList.remove('search-visible');
175                    searchBox.classList.add('search-hidden');
176
177                }
178
179            }
180
181        });
182
183    }
184
185    /* ===========================
186       WebFont
187    =========================== */
188
189    window.WebFontConfig = {
190        google: {
191            families: [
192                'Noto+Sans+JP:100,200,300,400,500,600,700,800,900',
193                'Outfit:100,200,300,400,500,600,700,800,900'
194            ]
195        }
196    };
197
198    (function (d) {
199
200        var wf = d.createElement('script');
201        var s = d.scripts[0];
202
203        wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js';
204        wf.async = true;
205
206        s.parentNode.insertBefore(wf, s);
207
208    })(document);
209
210});
211
212
213function MakeShop_afterListCartEntry(data) {
214
215    if (data.result) {
216
217        $('.cart-badge').text(data.totalQuantity).show();
218
219        var notification = $('.cart-notification');
220
221        notification.stop(true, true).fadeIn(300);
222
223        setTimeout(function () {
224            notification.fadeOut(500);
225        }, 3000);
226
227    } else {
228
229        data.method.modal(data.error.message, function () {
230
231            if (data.systemCode) {
232                location.href = '/view/item/' + data.systemCode;
233            }
234
235        });
236
237    }
238
239    return false;
240
241}
242
243
244function MakeShop_afterListFavoriteEntry(data) {
245
246    if (!data.result) {
247
248        data.method.modal(data.error.message);
249        return false;
250
251    }
252
253    $('a[href="' + data.source + '"]')
254        .addClass('hide')
255        .siblings('.favorite-on')
256        .removeClass('hide');
257
258    return false;
259
260}
261
262
263function MakeShop_afterListFavoriteRemove(data) {
264
265    if (!data.result) {
266
267        data.method.modal(data.error.message);
268        return false;
269
270    }
271
272    $('a[href="' + data.source + '"]')
273        .addClass('hide')
274        .siblings('.favorite-off')
275        .removeClass('hide');
276
277    return false;
278
279}
280$(function() {
281    const scrollPosition = sessionStorage.getItem('scrollPosition');
282    if (scrollPosition) {
283        window.scrollTo(0, scrollPosition);
284    }
285    $('.cart-quantity-up').on('click', function() {
286        const $target = $(this).closest('.cart-quantity');
287        changeQuantity($target, 'up');
288    });
289
290    $('.cart-quantity-down').on('click', function() {
291        const $target = $(this).closest('.cart-quantity');
292        changeQuantity($target, 'down');
293    });
294
295    $('.cart-quantity-input').on('change', function() {
296        const $target = $(this).closest('.cart-quantity');
297        if (parseInt($(this).val(), 10) < 1) {
298            $(this).val(1);
299        }
300        updateCart($target);
301    });
302
303    function changeQuantity($target, mode) {
304        const $input = $target.find('.cart-quantity-input');
305        let quantity = parseInt($input.val(), 10);
306
307        if (mode === 'up') {
308            quantity += 1;
309        } else if (mode === 'down' && quantity > 1) {
310            quantity -= 1;
311        }
312
313        $input.val(quantity);
314        updateCart($target);
315    }
316
317    function updateCart($target) {
318        const $input = $target.find('.cart-quantity-input');
319        const $editLink = $target.find('.cart-quantity-update');
320        const $downBtn = $target.find('.cart-quantity-down');
321        const quantity = parseInt($input.val(), 10);
322
323        if (quantity <= 1) {
324            $downBtn.addClass('disabled');
325        } else {
326            $downBtn.removeClass('disabled');
327        }
328
329        $editLink[0].click();
330    }
331
332    $('.cart-quantity').each(function() {
333        updateCart($(this));
334    });
335
336    $(window).on('beforeunload', function () {
337        sessionStorage.setItem('scrollPosition', window.scrollY);
338    });
339});

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.