", [1398,200], "ad-desktop-sitehat")
.setTargeting('test', 'infinitescroll')
.addService(googletag.pubads())
googletag.enableServices();
googletag.display('ad-desktop-sitehat');
// googletag.pubads().addEventListener('slotRenderEnded', event => {
// const adUnitPath = event.slot.getAdUnitPath();
// const slotId = event.slot.getSlotElementId();
// const isAdEmpty = event.isEmpty;
// if (adUnitPath.includes('Sitehat1398x200')) {
// return;
// }
// const fullscreenSearchTerms = ['Mobile-Fullscreen', 'Desktop-Fullscreen'];
// const isFullscreenAd = fullscreenSearchTerms.some(term => adUnitPath.includes(term)) && !isAdEmpty;
// if (event.slot === slot) {
// const ad = document.querySelector('#ad-desktop-sitehat');
// if (!ad || !event.size) {
// return;
// }
// setIframeRatio(ad, event, isFullscreenAd);
// window.adsArray = [...window.adsArray, { ad, event, isFullscreenAd }];
// }
// if (isFullscreenAd) {
// let checkInterval = setInterval(() => {
// if (window.estpress && window.estpress.ads) {
// const currentUrl = window.location.href;
// const galleryOpened = currentUrl.includes('#lg=');
// const fullscreenAd = window.estpress.ads.find(ad => ad.fullscreen === true && ad.galleryFullscreen === false);
// if (fullscreenAd && !galleryOpened) {
// fullscreenAd.addLoadedClass(event);
// }
// clearInterval(checkInterval);
// }
// }, 100);
// }
// });
googletag.pubads().refresh([slot]);
});
// window.onresize = () => {
// window.adsArray.forEach(({ ad, event, isFullscreenAd }) => {
// setIframeRatio(ad, event, isFullscreenAd);
// });
// };
// window.dispatchEvent(new Event('resize scroll'));
}