PageSourceSearch

https://www.kuromame.co.jp/js/userAfterLoading.js?cacheKey=1784691438

js kuromame.co.jp collected 2026-10-05 01:35:16 UTC 3,781 bytes, 97 lines download raw bytes

1addEventListener("onSysAllContentLoaded", function () {
2
3
4//要素を移動
5  $('#category_bottom').insertAfter('.sysItemList');
6
7//FAQアコーディオンメニュー
8  $('.faq-question').on('click', function() {
9    $(this).next('.faq-answer').slideToggle(300);
10    $(this).toggleClass('active');
11  });
12
13//グローバルメニュークリックドロップダウン開閉(20260618追加)
14$('.dropdown-toggle').on('click', function(e) {
15    e.preventDefault();
16    var $dropdown = $(this).siblings('.dropdown-menu');
17    var isExpanded = $(this).attr('aria-expanded') === 'true';
18
19    // 他の開いているメニューがあればゆっくり閉じる
20    $('.dropdown-menu').not($dropdown).slideUp('slow');
21    $('.dropdown-toggle').not(this).attr('aria-expanded', 'false');
22
23    // クリックしたメニューをゆっくり開閉する
24    $dropdown.slideToggle('slow');
25    $(this).attr('aria-expanded', !isExpanded);
26});
27
28// メニューの外側をクリックしたときにゆっくり閉じる
29$(document).on('click', function(e) {
30    if (!$(e.target).closest('.has-dropdown').length) {
31        $('.dropdown-menu').slideUp('slow');
32        $('.dropdown-toggle').attr('aria-expanded', 'false');
33    }
34});
35
36
37//ハンバーガーメニューとwrap処理(20260626設置)
38$(function () {
39  const mq = window.matchMedia('(max-width: 767px)');
40
41  function handleResponsiveMenu(e) {
42    if (e.matches) {
43      // 【スマホ時】
44      if ($('.sp-custom-wrapper').length === 0) {
45        $('body').append('<div class="sp-custom-wrapper"></div>');
46      }
47
48      // 1. 右側エリア (.right_wrap) の移動
49      if ($('.right_wrap').length && !$('.right_wrap').parent().hasClass('sp-custom-wrapper')) {
50        $('.right_wrap').before('<div class="origin-right-place" style="display:none;"></div>');
51        $('.right_wrap').appendTo('.sp-custom-wrapper');
52      }
53
54      // 2. グローバルメニュー (.header_globalmenu_2026) の移動
55      if ($('.header_globalmenu_2026').length && !$('.header_globalmenu_2026').parent().hasClass('sp-custom-wrapper')) {
56        $('.header_globalmenu_2026').before('<div class="origin-menu-place" style="display:none;"></div>');
57        $('.header_globalmenu_2026').appendTo('.sp-custom-wrapper');
58      }
59
60    } else {
61      // 【PC時】元の位置にそれぞれ戻す
62      if ($('.origin-right-place').length) {
63        $('.origin-right-place').before($('.right_wrap'));
64        $('.origin-right-place').remove();
65      }
66      if ($('.origin-menu-place').length) {
67        $('.origin-menu-place').before($('.header_globalmenu_2026'));
68        $('.origin-menu-place').remove();
69      }
70
71      // 開閉状態をリセット
72      $('.hamburger-btn').removeClass('active');
73      $('.sp-custom-wrapper').removeClass('open');
74    }
75  }
76
77  // 画面幅の変更を監視
78  mq.addListener(handleResponsiveMenu);
79  handleResponsiveMenu(mq);
80
81  // ハンバーガーボタンをクリックした時の開閉処理
82  $(document).on('click', '.hamburger-btn', function() {
83    $(this).toggleClass('active');
84    $('.sp-custom-wrapper').toggleClass('open');
85  });
86
87  // 【新規追加】領域外(メニューとボタン以外)をクリックした時に閉じる処理
88  $(document).on('click', function(e) {
89    // クリックされた要素が「メニュー本体(その中身含む)」でも「ボタン(その中身含む)」でもない場合
90    if (!$(e.target).closest('.sp-custom-wrapper').length && !$(e.target).closest('.hamburger-btn').length) {
91      $('.hamburger-btn').removeClass('active');
92      $('.sp-custom-wrapper').removeClass('open');
93    }
94  });
95});
96});
97/* #END_OF_RESOURCE_FILE */

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.