Поиск:

window.yaContextCb.push(() => { Ya.Context.AdvManager.render({ "blockId": "R-A-99196-28", "type": "floorAd", "platform": "touch" }) }) window.yaContextCb.push(() => { Ya.Context.AdvManager.render({ "blockId": "R-A-99196-26", "type": "floorAd", "platform": "desktop" }) }) const feed = document.getElementById('yandex_rtb_R-A-99196-25'); // ID из поля renderTo const callback = (entries) => { entries.forEach((entry) => { if (entry.isIntersecting) { Ya.Context.AdvManager.destroy({ blockId: 'R-A-99196-28' }), // blockId для мобильной версии Ya.Context.AdvManager.destroy({ blockId: 'R-A-99196-26' }); // blockId для десктопной версии } }); }; const observer = new IntersectionObserver(callback, { threshold: 0, }); observer.observe(feed);