1document.addEventListener("DOMContentLoaded", () => { 2 // Get all expand toggle buttons that were already initialized by the free version 3 document.querySelectorAll(".ub-expand-toggle-button").forEach((instance) => { 4 const addProFeatures = () => { 5 const blockRoot = instance.closest(".ub-expand"); 6 7 const fadeElement = blockRoot?.querySelector(".ub-expand-partial > div"); 8 if (fadeElement) { 9 fadeElement.classList.toggle("ub-fade"); 10 } 11 }; 12 13 // Enhance click handler 14 const originalClickHandler = instance.onclick; 15 instance.addEventListener("click", (e) => { 16 if (originalClickHandler) { 17 originalClickHandler.call(instance, e); 18 } 19 addProFeatures(); 20 }); 21 22 // Enhance keydown handler 23 instance.addEventListener("keydown", (e) => { 24 if ([" ", "Enter"].includes(e.key)) { 25 addProFeatures(); 26 } 27 }); 28 }); 29});
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.