Patrocinado
`; function switchAdContent() { const currentWidth = window.innerWidth; const isMobileView = currentWidth < MOBILE_BREAKPOINT; const shouldBeDesktop = !isMobileView; const currentContentIsDesktop = container.innerHTML.includes('data-ad-slot="8712656588"'); if (shouldBeDesktop && !currentContentIsDesktop) { container.innerHTML = desktopContent; } else if (!shouldBeDesktop && currentContentIsDesktop) { container.innerHTML = mobileContent; } } document.addEventListener('DOMContentLoaded', switchAdContent); window.addEventListener('resize', switchAdContent);
0 Comentários 0 Compartilhamentos 407 Visualizações 0 Anterior
Patrocinado
Patrocinado
Patrocinado