(function () { function isReallyEmpty(html) { return html .replace(/


<\/p>/gi, '') .replace(/

\s*<\/p>/gi, '') .replace(/ /gi, '') .replace(//gi, '') .replace(/\s+/g, '') .replace(/<[^>]*>/g, '') .trim() === ''; } function cleanAccordion() { document.querySelectorAll('.acf-accordion details.e-n-accordion-item').forEach(function (item) { const container = item.querySelector('.elementor-widget-container'); if (!container) return; const html = container.innerHTML; if (isReallyEmpty(html)) { item.remove(); } }); } setInterval(cleanAccordion, 500); })();