[]
Deep Sea | National Geographic
{ const doneEvent = new Event(“OneTrustInteractionDone”); document.dispatchEvent(doneEvent); window.OneTrustInteractionDone = doneEvent; } ); const startDate = new Date().getTime(); const intervalId = setInterval(() => { const currentDate = new Date().getTime(); if (currentDate – startDate > 20 * 1000) { clearInterval(intervalId); } if (window.__tcfapi) { window.__tcfapi(‘ping’, 2, e => { if (e.cmpLoaded && e.cmpLoaded === true && e.cmpStatus && e.cmpStatus === “loaded”) { clearInterval(intervalId); const cmpReadyEvent = new Event(“CmpRequirementsReady”); window.CmpRequirementsReady = cmpReadyEvent; document.dispatchEvent(cmpReadyEvent); if (window.OneTrust && window.OneTrust.IsAlertBoxClosed()) { const doneEvent = new Event(“OneTrustInteractionDone”); window.OneTrustInteractionDone = doneEvent; document.dispatchEvent(doneEvent); } } }); } }, 50); const hydrationCallback = () => { if (!window.___hydrationExecuted) { window.___hydrationExecuted = true; const hydrate = () => { document.getElementById(‘__LOADABLE_REQUIRED_CHUNKS__’).innerHTML = ‘[]’; window.___hydrationFiles.forEach(file => { const script = document.createElement(‘script’); script.src = file; script.async = true; document.body.appendChild(script); }) }; if (document.readyState === “loading”) { document.addEventListener(“DOMContentLoaded”, hydrate); } else { hydrate(); } (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=false;j.src=’https://www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f); })(window,document,’script’,’dataLayer’,’GTM-W2Q42S’); } }; document.addEventListener(‘OneTrustInteractionDone’, hydrationCallback, { once: true }); } }]]>
Source
