1document.addEventListener("DOMContentLoaded", function () { 2 const tooltipTrigger = document.querySelector(".author-tooltip-trigger"); 3 const tooltip = document.querySelector(".author-tooltip"); 4 5 if (!tooltipTrigger || !tooltip) return; 6 7 let tooltipTimeout; 8 9 const showTooltip = () => { 10 clearTimeout(tooltipTimeout); 11 tooltip.classList.add("show_author_tooltip"); 12 }; 13 14 const hideTooltip = () => { 15 tooltipTimeout = setTimeout(() => { 16 tooltip.classList.remove("show_author_tooltip"); 17 }, 100); // 300ms delay before closing 18 }; 19 20 tooltipTrigger.addEventListener("mouseenter", showTooltip); 21 22 tooltipTrigger.addEventListener("mouseleave", function (e) { 23 const toElement = e.relatedTarget; 24 if (!tooltip.contains(toElement)) { 25 hideTooltip(); 26 } 27 }); 28 29 // When hovering over the tooltip, keep it open 30 tooltip.addEventListener("mouseenter", showTooltip); 31 32 // When leaving the tooltip, hide it with delay 33 tooltip.addEventListener("mouseleave", function (e) { 34 const toElement = e.relatedTarget; 35 if (!tooltipTrigger.contains(toElement)) { 36 hideTooltip(); 37 } 38 }); 39});
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.