PageSourceSearch

https://www.hikwsi-powata.com/view/asset/user-6-1-6-4c0e184e5365c8d93902b4a5fc88cce2.js

js hikwsi-powata.com collected 2026-10-06 07:53:04 UTC 7,614 bytes, 233 lines download raw bytes

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
163window.onload = function() {
164var now = new Date();
165var start = new Date('2026/1/1 0:00:00'); // 表示開始日時(時間は24h表記)
166var end = new Date('2026/1/15 0:00:00'); // 表示終了日時(時間は24h表記)
167
168// 正月バナーの表示
169if ( start <  now && now < end ) {
170    document.getElementById("timeLimitedScript").style.display="block";
171}
172}
173
174$(function() {
175    const scrollPosition = sessionStorage.getItem('scrollPosition');
176    if (scrollPosition) {
177        window.scrollTo(0, scrollPosition);
178    }
179    $('.cart-quantity-up').on('click', function() {
180        const $target = $(this).closest('.cart-quantity');
181        changeQuantity($target, 'up');
182    });
183
184    $('.cart-quantity-down').on('click', function() {
185        const $target = $(this).closest('.cart-quantity');
186        changeQuantity($target, 'down');
187    });
188
189    $('.cart-quantity-input').on('change', function() {
190        const $target = $(this).closest('.cart-quantity');
191        if (parseInt($(this).val(), 10) < 1) {
192            $(this).val(1);
193        }
194        updateCart($target);
195    });
196
197    function changeQuantity($target, mode) {
198        const $input = $target.find('.cart-quantity-input');
199        let quantity = parseInt($input.val(), 10);
200
201        if (mode === 'up') {
202            quantity += 1;
203        } else if (mode === 'down' && quantity > 1) {
204            quantity -= 1;
205        }
206
207        $input.val(quantity);
208        updateCart($target);
209    }
210
211    function updateCart($target) {
212        const $input = $target.find('.cart-quantity-input');
213        const $editLink = $target.find('.cart-quantity-update');
214        const $downBtn = $target.find('.cart-quantity-down');
215        const quantity = parseInt($input.val(), 10);
216
217        if (quantity <= 1) {
218            $downBtn.addClass('disabled');
219        } else {
220            $downBtn.removeClass('disabled');
221        }
222
223        $editLink[0].click();
224    }
225
226    $('.cart-quantity').each(function() {
227        updateCart($(this));
228    });
229
230    $(window).on('beforeunload', function () {
231        sessionStorage.setItem('scrollPosition', window.scrollY);
232    });
233});

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.