PageSourceSearch

https://katonobo.com/wp-content/plugins/katonobo-brand/assets/menu.js?ver=1.1.2&fver=20261002090958

js katonobo.com collected 2026-10-02 12:00:51 UTC 1,504 bytes, 34 lines download raw bytes

1(() => {
2  'use strict';
3  const header = document.querySelector('.kb-brand-header');
4  if (!header) return;
5  const toggle = header.querySelector('.kb-brand-menu-toggle');
6  const nav = header.querySelector('.kb-brand-nav');
7  if (!toggle || !nav) return;
8  header.classList.add('kb-brand-has-menu');
9  toggle.hidden = false;
10  const desktop = window.matchMedia('(min-width: 761px)');
11  function setOpen(open, restoreFocus = false) {
12    toggle.setAttribute('aria-expanded', String(open));
13    toggle.textContent = open ? '閉じる' : 'メニュー';
14    nav.classList.toggle('kb-brand-is-open', open);
15    if (open) nav.querySelector('a')?.focus();
16    else if (restoreFocus) toggle.focus();
17  }
18  toggle.addEventListener('click', () => setOpen(toggle.getAttribute('aria-expanded') !== 'true'));
19  document.addEventListener('keydown', event => {
20    if (event.key === 'Escape' && toggle.getAttribute('aria-expanded') === 'true') setOpen(false, true);
21  });
22  document.addEventListener('pointerdown', event => {
23    if (!header.contains(event.target)) setOpen(false);
24  });
25  nav.addEventListener('click', event => {
26    const link = event.target.closest('a');
27    if (!link) return;
28    setOpen(false);
29    if (typeof window.gtag === 'function') window.gtag('event', 'site_navigation_click', {
30      source_path: location.pathname, destination: new URL(link.href).pathname, placement: 'header'
31    });
32  });
33  desktop.addEventListener('change', event => { if (event.matches) setOpen(false); });
34})();

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.