document.addEventListener('DOMContentLoaded', function () {
// Run on real homepage OR test homepage
if (
!document.body.classList.contains('home') &&
!document.body.classList.contains('test-home')
) {
return;
}
document.querySelectorAll('.hide-if-empty').forEach(function(container) {
const items = container.querySelectorAll('.e-loop-item');
if (items.length === 0) {
container.style.outline = '3px solid red';
}
});
});