try { const placeholder = document.querySelector('#cmp-uc-shadow').shadowRoot.childNodes[3]; if (placeholder) { if (window.__ucCmp) { window.__ucCmp.isInitialized().then(initialized => { if (initialized) { window.__ucCmp.isConsentRequired().then(consentRequired => { if (!consentRequired) { placeholder.remove(); } }); } }); const interactionDone = localStorage.getItem('cmp-uc-interaction-done'); if (interactionDone) { placeholder.remove(); } else { placeholder.style.display = 'block'; } window.addEventListener('UC_CONSENT', function (e) { if (event.detail.consent.type === 'EXPLICIT') { placeholder.remove(); localStorage.setItem('cmp-uc-interaction-done', true); } }); } } } catch (err) { console.log('err', err); }