PageSourceSearch

https://www.ozgaming-pcshop.com/view/asset/user-107-1-2-fd41ba1d8e1f53eaae3ad446a3960f80.js

js ozgaming-pcshop.com collected 2026-10-04 22:09:48 UTC 14,692 bytes, 372 lines download raw bytes

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.