MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 178: Line 178:
         $(this).css('overflow-y', 'hidden');
         $(this).css('overflow-y', 'hidden');
     });
     });
    // Description formatting for Community Cards
    function formatCommunityCardDescriptions() {
        $('.community-card').each(function() {
            var descriptionContainer = $(this).find('.community-description');
            var rawDescription = descriptionContainer.text();
            descriptionContainer.html(rawDescription);
        });
    }
    // Check if we are on a page that requires community card formatting
    if ($('.community-card').length) {
        formatCommunityCardDescriptions();
    }
});
});

Navigation menu