MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Tag: Manual revert
No edit summary
Line 15: Line 15:
     updateFeaturedVisibility();
     updateFeaturedVisibility();
      
      
    // Insert the community featured element after the second card
     if (communityFeatured.length && filteredCards.length >= 2) {
     if (communityFeatured.length && filteredCards.length >= 2) {
        // Detach and insert the community featured element after the second card
         communityFeatured.detach();
         communityFeatured.detach();
         filteredCards.eq(1).after(communityFeatured);
         filteredCards.eq(1).after(communityFeatured);
        // Show the community-featured element after positioning it
         communityFeatured.show();
         communityFeatured.show();
     }
     }


// Check if we are on a page that requires community card formatting
// Format community card, when in the Community Entries page
if ($('.community-card').length) {
if ($('.community-card').length) {
    formatCommunityCardDescriptions();
    formatCommunityCardDescriptions();
}
}
    if (communityListFeatured.length && filteredCards.length >= 4) {
        // Detach and insert the community featured element after the second card
        communityListFeatured.detach();
        filteredCards.eq(3).after(communityListFeatured);
        // Show the community-featured element after positioning it
        communityListFeatured.show();
    }


     // Check if the specific element exists on the page
     // Check if the specific element exists on the page

Navigation menu