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.