function SpanObf() { var offlinks = [...document.querySelectorAll('.nsn-obf-link')]; offlinks.forEach((link) => { link.removeEventListener('click', clickHandler); link.addEventListener('click', clickHandler); }); } function clickHandler(e) { var href = decodeURIComponent(window.atob(e.currentTarget.getAttribute('data-link'))); var target = e.currentTarget.getAttribute('data-target'); if (target != null) { window.open(href); } else { window.location.href = href; } } function handleObfuscationScripts() { SpanObf(); const observer = new MutationObserver((list) => { list.forEach((element) => { if (element.target.classList.contains('table-sort') || element.target.classList.contains('stacktable') || element.target.classList.contains('cp-modal-open') ) { SpanObf(); } }); }); observer.observe(document.body, { attributes: true, childList: true, subtree: true, }); } if (document.readyState !== 'loading') { handleObfuscationScripts(); } else { document.addEventListener('DOMContentLoaded', handleObfuscationScripts); }