diff --git a/scripts/delayed.js b/scripts/delayed.js index fd2e634a..17b85a7f 100644 --- a/scripts/delayed.js +++ b/scripts/delayed.js @@ -1,12 +1,9 @@ // eslint-disable-next-line import/no-cycle -import { sampleRUM, loadScript, fetchPlaceholders } from './aem.js'; +import { sampleRUM, loadScript } from './aem.js'; // Core Web Vitals RUM collection sampleRUM('cwv'); -// fetch placeholders file -const placeholders = await fetchPlaceholders(); - /* * Returns the environment type based on the hostname. */ @@ -32,30 +29,4 @@ async function loadAdobeLaunch() { }); } -// OneTrust Cookies Consent Notice start -/* if (!window.location.host.includes('hlx.page') && !window.location.host.includes('localhost')) { - const otId = placeholders.onetrustid; - if (otId) { - loadScript('https://cdn.cookielaw.org/scripttemplates/otSDKStub.js', { - type: 'text/javascript', - charset: 'UTF-8', - 'data-domain-script': `${otId}`, - }); - - window.OptanonWrapper = () => { - }; - } - - const allButtons = document.querySelectorAll('a.button'); - allButtons.forEach((button) => { - if (button.getAttribute('href').includes('cookie-policy')) { - button.addEventListener('click', (e) => { - // eslint-disable-next-line no-undef - OneTrust.ToggleInfoDisplay(); - e.preventDefault(); - }); - } - }); -} */ - if (!window.location.host.includes('localhost')) await loadAdobeLaunch();