1export function initModal() { 2 const modals = document.querySelectorAll('.ncModal'); 3 4 modals.forEach(modal => { 5 const trigger = modal.querySelector('.ncModal_trigger'); 6 const wrapper = modal.querySelector('.ncModal_wrapper'); 7 const container = modal.querySelector('.ncModal_inner'); 8 const closeEls = modal.querySelectorAll('.ncModal_layer, .ncModal_close'); 9 10 if (!trigger || !wrapper) return; 11 12 // ãéãã 13 trigger.addEventListener('click', (e) => { 14 e.preventDefault(); // 念ã®ããaã¿ã°ãªã©ã®ããã©ã«ãåä½ã鲿¢ 15 16 if (container) container.scrollTop = 0; 17 18 // JSã§ç´æ¥ã¹ã¿ã¤ã«ãå½ã¦ãï¼æåªå ã«ããï¼ 19 wrapper.style.setProperty('display', 'block', 'important'); 20 21 // ã¯ã©ã¹ãä»ä¸ï¼ã¢ãã¡ã¼ã·ã§ã³ç¨ï¼ 22 setTimeout(() => { 23 wrapper.classList.add('active'); 24 }, 10); 25 26 document.body.style.overflow = 'hidden'; 27 }); 28 29 // ãéããã 30 closeEls.forEach(el => { 31 el.addEventListener('click', () => { 32 wrapper.classList.remove('active'); 33 34 // ã¢ãã¡ã¼ã·ã§ã³ï¼0.4sï¼ãçµãã£ã¦ããæ¶ã 35 setTimeout(() => { 36 wrapper.style.setProperty('display', 'none', 'important'); 37 document.body.style.overflow = ''; 38 }, 400); 39 }); 40 }); 41 }); 42}
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.