1function removeParentCatAnchorHrefMobileMenu(){ 2 document.addEventListener('DOMContentLoaded', ()=>{ 3 setTimeout(function(){ 4 // Get all categories that have expandable sections 5 const parentCats = document.querySelectorAll('div.mobile-sidebar > div.sidebar-menu > ul.nav-sidebar > li.menu-item.has-child'); 6 7 // For each parent category... 8 parentCats.forEach(parentCat=>{ 9 // Remove href from original anchor tag 10 const catAnchor = parentCat.querySelector('a'); 11 catAnchor.removeAttribute('href'); 12 catAnchor.style.cursor = 'pointer'; 13 14 // Add onclick listener to anchor that toggles expandable section 15 catAnchor.addEventListener('click', ()=>{ 16 if (parentCat.classList.contains('active')){ 17 parentCat.classList.remove('active'); 18 parentCat.setAttribute('aria-expanded', 'false'); 19 }else{ 20 parentCat.classList.add('active'); 21 parentCat.setAttribute('aria-expanded', 'true'); 22 } 23 }); 24 }); 25 }, 250) 26 }); 27}; 28removeParentCatAnchorHrefMobileMenu();
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.