document.addEventListener("external.iframe.event", function ( ev ) {
console.log("yt.iframe.event received - ", window.OnetrustActiveGroups);
if(!window.OnetrustActiveGroups.includes("C0002") && !window.OnetrustActiveGroups.includes("C0003") && !window.OnetrustActiveGroups.includes("C0004")) {
let iframeElements = document.querySelectorAll("iframe.optanon-category-C0002-C0003-C0004");
let newMsgDiv = document.createElement('div');
newMsgDiv.style.cssText = 'height:100%;align-content:center;';
newMsgDiv.innerHTML = '<div><em>Please note: cookies must be enabled to view the content. If you do not see content here, you can amend your <a data-link-style="core-brand" href="javascript:OneTrust.ToggleInfoDisplay()">Cookie Settings</a> and enable Cookies in your browser.</em></div>';
for (var i = 0; i < iframeElements.length; i++) {
iframeElements[i].parentNode.replaceChild(newMsgDiv, iframeElements[i]);
}
}
});