1function pdsAccordion(id, parentClassName) { 2 const firstCategory = document.querySelector('.' + parentClassName + ' #' + id); 3 if (firstCategory) { 4 firstCategory.classList.add('active'); 5 } 6 7 const coll = document.querySelectorAll('.' + parentClassName + ' .pds-collapsible'); 8 let i, j; 9 10 if (coll) { 11 for (i = 0; i < coll.length; i++) { 12 coll[i].addEventListener('click', function () { 13 const content = this.nextElementSibling; 14 if (content.style.maxHeight) { 15 content.style.maxHeight = null; 16 } else { 17 content.style.maxHeight = content.scrollHeight + 'px'; 18 } 19 20 for (let i = 0; i < this.childNodes.length; i++) { 21 const temp = this.childNodes[i]; 22 23 if (temp instanceof Element) { 24 if (temp.classList.contains("accordion-symbol")) { 25 if (temp.innerHTML === '+') { 26 temp.innerHTML = "-"; 27 } else { 28 temp.innerHTML = "+"; 29 } 30 break; 31 } 32 } 33 } 34 }); 35 } 36 } 37 38 const header_btn = document.querySelectorAll('.' + parentClassName + ' .pds-header-btn'); 39 const accordion_group = document.querySelectorAll('.' + parentClassName + ' .pds-accordion-group'); 40 41 for (let j = 0; j < accordion_group.length; j++) { 42 accordion_group[j].style.display = 'none'; 43 } 44 45 for (i = 0; i < header_btn.length; i++) { 46 if (i < 1) { 47 accordion_group[i].style.display = "block"; 48 } else { 49 accordion_group[i].style.display = "none"; 50 } 51 } 52} 53 54if (document.querySelector('.block-t-n-c')) { 55 pdsAccordion(); 56}
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.