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 12: Line 12:
      
      
     // Insert the community featured element after the second card
     // Insert the community featured element after the second card
    if (communityFeatured.length && filteredCards.length >= 2) {
if (communityFeatured.length && filteredCards.length >= 2) {
        communityFeatured.detach();
    console.log("Community Featured element and at least two filtered cards found.");
        filteredCards.eq(1).after(communityFeatured);
    communityFeatured.detach();
        communityFeatured.show();
    filteredCards.eq(1).after(communityFeatured);
    }
    communityFeatured.show();
    console.log("Community Featured element has been moved after the second filtered card.");
} else {
    if (!communityFeatured.length) {
        console.log("No Community Featured element found.");
    }
    if (filteredCards.length < 2) {
        console.log("Less than two filtered cards found. Found: ", filteredCards.length);
    }
}
 


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

Navigation menu