FORMED Information Request Form
Thank you for your interest in FORMED ICSJ Young Adults! Please complete and submit the form below, and we'll get back to you soon with more information. God Bless!
Your Custom Text Here
Thank you for your interest in FORMED ICSJ Young Adults! Please complete and submit the form below, and we'll get back to you soon with more information. God Bless!
Explore ways to share your time, talent, and heart in service to others and to our parish family.
`; const norm = s => (s || '').replace(/\s+/g, ' ').trim().toLowerCase(); function injectIntoUl(ul) { if (!ul || ul.querySelector(':scope > li.dropdown-intro')) return false; const li = document.createElement('li'); li.className = 'dropdown-intro'; li.innerHTML = INTRO_HTML; ul.insertBefore(li, ul.firstChild); return true; } function injectDesktop() { // Desktop structure: #topNav .folder-collection.folder > a + .subnav > ul const folders = document.querySelectorAll('#topNav .folder-collection.folder'); folders.forEach(li => { const a = li.querySelector(':scope > a'); if (a && norm(a.textContent) === TARGET) { const ul = li.querySelector('.subnav > ul'); injectIntoUl(ul); } }); } function injectMobile() { // Mobile structure from your snippet: // #mobileNav nav.main-nav.mobileNav li.folder-collection.folder // > label.folder-toggle-label (text) + .subnav > ul const folders = document.querySelectorAll('#mobileNav nav.main-nav.mobileNav li.folder-collection.folder'); folders.forEach(li => { const label = li.querySelector(':scope > label.folder-toggle-label'); if (label && norm(label.textContent) === TARGET) { const ul = li.querySelector('.subnav > ul'); injectIntoUl(ul); } }); } function runAll(root) { // If a specific root is passed (mutation), try relative searches too (root ? [root] : [document]).forEach(() => { injectDesktop(); injectMobile(); }); } function boot() { runAll(); // Squarespace often rebuilds nav; observe and re-inject as needed const obs = new MutationObserver(muts => { for (const m of muts) { if (m.addedNodes && m.addedNodes.length) { m.addedNodes.forEach(n => { if (n.nodeType === 1 && (n.id === 'topNav' || n.id === 'mobileNav' || n.closest?.('#topNav, #mobileNav'))) { runAll(n); } }); } } }); obs.observe(document.body, { childList: true, subtree: true }); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', boot); } else { boot(); } })();