PageSourceSearch

https://www.bsfuji.tv/odorubsf_2026/js/script.js

js bsfuji.tv collected 2026-10-01 11:29:02 UTC 1,770 bytes, 49 lines download raw bytes

1document.addEventListener('DOMContentLoaded', function () {
2
3  /* --- ハンバーガーメニュー --- */
4  var navToggle = document.getElementById('navToggle');
5  var nav = document.getElementById('nav');
6  navToggle.addEventListener('click', function () {
7    var isOpen = nav.classList.toggle('is-open');
8    navToggle.setAttribute('aria-expanded', isOpen ? 'true' : 'false');
9  });
10  nav.querySelectorAll('a').forEach(function (link) {
11    link.addEventListener('click', function () {
12      nav.classList.remove('is-open');
13      navToggle.setAttribute('aria-expanded', 'false');
14    });
15  });
16
17  /* --- スクロールフェードイン --- */
18  var reveals = document.querySelectorAll('.reveal');
19  if ('IntersectionObserver' in window) {
20    var io = new IntersectionObserver(function (entries) {
21      entries.forEach(function (entry) {
22        if (entry.isIntersecting) {
23          entry.target.classList.add('is-visible');
24          io.unobserve(entry.target);
25        }
26      });
27    }, { threshold: 0.15 });
28    reveals.forEach(function (el) { io.observe(el); });
29  } else {
30    reveals.forEach(function (el) { el.classList.add('is-visible'); });
31  }
32
33  /* --- トースト通知(SNSボタン押下時のフィードバック) --- */
34  var toast = document.getElementById('toast');
35  var toastTimer = null;
36  function showToast(message) {
37    toast.textContent = message;
38    toast.classList.add('is-visible');
39    clearTimeout(toastTimer);
40    toastTimer = setTimeout(function () {
41      toast.classList.remove('is-visible');
42    }, 2400);
43  }
44  window.showToast = showToast;
45  document.querySelectorAll('[data-toast]').forEach(function (btn) {
46    btn.addEventListener('click', function () { showToast(btn.getAttribute('data-toast')); });
47  });
48
49});

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.