Skip to content

Commit

Permalink
remove onetrust code
Browse files Browse the repository at this point in the history
  • Loading branch information
rrusher committed Feb 6, 2024
1 parent bc34c66 commit 75d5273
Showing 1 changed file with 1 addition and 30 deletions.
31 changes: 1 addition & 30 deletions scripts/delayed.js
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand All @@ -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();

0 comments on commit 75d5273

Please sign in to comment.