User:BIONICLE-fan112/global.js

// Hide trending pages within empty categories window.addEventListener('DOMContentLoaded', function {  var trendingSections = document.querySelectorAll('.category-page__trending');  trendingSections.forEach(function (section) { var categoryContent = section.closest('.category-page__members'); if (categoryContent.querySelectorAll('.category-page__member').length === 0) { section.style.display = 'none'; } }); });