1(function (Drupal, once) { 2 Drupal.behaviors.article_more_credits = { 3 attach: function (context, settings) { 4 const fullMoreNewsButtons = once('full_gallery_button_more_credits', '.node--view-mode-full', context); 5 fullMoreNewsButtons.forEach((fullMoreNewsButton) => { 6 const containerShowMore = document.querySelectorAll(".show_more_metalocus"); 7 containerShowMore.forEach((container) => { 8 if (container.offsetHeight >= 97) { 9 showMoreButtonActions(container); 10 } 11 }); 12 }); 13 14 function showMoreButtonActions(container) { 15 container.classList.toggle("expandable"); 16 let container_wrapper = container.querySelector(".show_more_container"); 17 const fullHeight = container_wrapper.scrollHeight; 18 const showMoreHeight = container.dataset.show_more_height; 19 container_wrapper.style.maxHeight = showMoreHeight; 20 const button = container.querySelector(".credits_buttons"); 21 button.addEventListener("click", function () { 22 container.classList.toggle("expanded"); 23 if (container.classList.contains("expanded")) { 24 container_wrapper.style.maxHeight = fullHeight + "px"; 25 } else { 26 container_wrapper.style.maxHeight = showMoreHeight; 27 } 28 }); 29 } 30 } 31 }; 32}(Drupal, once)); 33
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.