crossorigin="anonymous">
지식알림이
// IntersectionObserver 세팅
const observer = new IntersectionObserver((entries, obs) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
insertAd(entry.target);
obs.unobserve(entry.target);
}
});
}, {
rootMargin: '0px 0px 300px 0px',
threshold: 0
});
document.querySelectorAll('.ads-observe-zone').forEach(el => {
observer.observe(el);
});
});