MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 37: Line 37:
         communityListFeatured.hide();
         communityListFeatured.hide();
         console.log("Community List Featured should now be hidden");
         console.log("Community List Featured should now be hidden");
         updateBorder();
         console.log("Filter clicked, updating borders");
         console.log("Border when filters apply updated");
         setTimeout(updateBorder, 100); // Delayed to account for the time it takes to apply the filter
     });
     });


Line 99: Line 99:
         console.log("Removed bottom border from all items");
         console.log("Removed bottom border from all items");


         // Count the number of visible items
         // Filter only truly visible items
         var visibleItems = $('#list-list div.filtered-list-item').filter(function() {
         var visibleItems = $('#list-list div.filtered-list-item').filter(function() {
             return $(this).css('display') !== 'none';
             return $(this).is(':visible');
         });
         });
         console.log("Number of visible items:", visibleItems.length);
         console.log("Number of truly visible items:", visibleItems.length);


         // If there's only one visible item, add the border
         // If there's only one visible item, add the border
Line 113: Line 113:
         }
         }
     }
     }


// Run the function on page load
// Run the function on page load

Navigation menu