MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 110: Line 110:


             // Check if the related-articles div has content and add a label
             // Check if the related-articles div has content and add a label
            if (relatedArticlesHtml && relatedArticlesHtml.trim().length > 0) {
if (relatedArticlesHtml && relatedArticlesHtml.trim().length > 0) {
            $('#related-articles').html('<div class="related-articles-label"><h3>Related Articles</h3></div>' + relatedArticlesHtml).show();
    $('#related-articles').html('<div class="related-articles-label">Related Articles</div><div class="related-articles-container">' + relatedArticlesHtml + '</div>').show();
            } else {
} else {
            $('#related-articles').html('<p>No related articles found.</p>').show();
    $('#related-articles').html('<div class="related-articles-label">No related articles found.</div>').show();
            }
}
 
function formatParagraphs(text) {
function formatParagraphs(text) {
    // Split the text into paragraphs and wrap each in a <span>
    // Split the text into paragraphs and wrap each in a <span>

Navigation menu