OwlCyberSecurity - MANAGER
Edit File: ez-toc-widget-sticky.min.js
window.addEventListener("DOMContentLoaded",(()=>{let e,t=null;const o=document.querySelector(".ez-toc-widget-sticky nav");function n(){e=new IntersectionObserver((e=>{e.forEach((e=>{console.log(e.intersectionRatio);const n=e.target.getAttribute("id");if(n){const e=document.querySelector(`.ez-toc-widget-sticky nav li a[href="#${n}"]`),c=document.querySelectorAll(".ez-toc-widget-sticky nav li.active");e&&(c.length>0&&c.forEach((e=>{e.classList.remove("active")})),e.parentElement.classList.add("active"),t=e.parentElement,function(e,t){const o=t.getBoundingClientRect(),n=e.getBoundingClientRect();return n.top>=o.top&&n.bottom<=o.bottom}(e.parentElement,o)||e.parentElement.scrollIntoView({behavior:"smooth",block:"center"}))}}))}),{threshold:[0,.5],rootMargin:"0px 0px -40% 0px"})}n(),document.querySelectorAll(".ez-toc-section").forEach((t=>{e.observe(t)})),o.addEventListener("click",(t=>{t.target.closest("a")&&(e.disconnect(),setTimeout((()=>{n(),document.querySelectorAll(".ez-toc-section").forEach((t=>{e.observe(t)}))}),2e3))}))}));