function OptanonWrapper() { document.getElementsByClassName('ot-pc-logo')[0].insertAdjacentElement('afterend', document.getElementById('ot-pc-title')); const tagsH2 = [...document.querySelectorAll('#onetrust-consent-sdk h2')]; tagsH2.forEach(tag => otreplace(tag,"ot-h2")); const tagsH3 = [...document.querySelectorAll('#onetrust-consent-sdk h3')]; tagsH3.forEach(tag => otreplace(tag,"ot-h3")); const tagsH4 = [...document.querySelectorAll('#onetrust-consent-sdk h4')]; tagsH4.forEach(tag => otreplace(tag,"ot-h4")); function otreplace(tag,otclass) { const parent = tag.parentNode; const newElement = document.createElement("div"); if(tag.id != undefined) newElement.setAttribute("id", ""+tag.id+""); newElement.classList = tag.classList; newElement.classList.add(otclass); newElement.innerHTML = tag.innerHTML; parent.insertBefore(newElement,tag); parent.removeChild(tag); } }