const myInterval = setInterval(showOsanoDrawer, 1000);
function showOsanoDrawer() {
var privacyLink = document.querySelector('.privacy-policy-link');
if(privacyLink){
document.querySelector('.privacy-policy-link').addEventListener('click', (e) => {
Osano.cm.showDrawer('osano-cm-dom-info-dialog-open');
});
}
}
//SC2-1719: Display a Warning Message when Leaving the Site
const isElementLoaded = async selector => {
while ( document.querySelector(selector) === null) {
await new Promise( resolve => requestAnimationFrame(resolve) )
}
return document.querySelector(selector);
};
function checkForElement() {
isElementLoaded('.richtextlink').then((selector) => {
document.querySelectorAll(".richtextlink").forEach((el) => {
el.href = 'void(0)';
el.onclick = function(event) {
if(!el.getAttribute("data-url").toLowerCase().includes("newrelic.com")) {
event.preventDefault();
const confirm = window.confirm("You will now be redirected to:\n\n" + el.getAttribute("data-url"));
if (confirm) {
window.open(el.getAttribute("data-url"), "_blank");
} else {
event.preventDefault();
}
} else {
window.open(el.getAttribute("data-url"), "_blank");
}
}
el.oncontextmenu = function(event) {
el.href = el.getAttribute("data-url");
}
el.onauxclick = function(event) {
el.href = el.getAttribute("data-url");
}
});
});
}
if(window.location.pathname.includes('/hubtopic/')){
const attachListener = setInterval(checkForElement, 1000);
}
×Sorry to interruptCSS Error