MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Tag: Reverted
Line 60: Line 60:
var quote = $(this).find('.quote').text();
var quote = $(this).find('.quote').text();
var modificationDate = $(this).find('.modification-date').text();
var modificationDate = $(this).find('.modification-date').text();
             var relatedArticlesHtml = $(this).find('.related-articles').html();
             // Fetching related articles content
    var relatedArticlesHtml = $(this).find('.related-articles').html();
    // Check if the related-articles div has content
    if (relatedArticlesHtml && relatedArticlesHtml.trim().length > 0) {
        $('#related-articles').html(relatedArticlesHtml).show();
    } else {
        $('#related-articles').html('<p>No related articles found.</p>').show();
    }


             // Update the fixed column content
             // Update the fixed column content
Line 107: Line 115:


             $('#article-content').html(articleContentHtml);
             $('#article-content').html(articleContentHtml);
            $('#related-articles').html(relatedArticlesHtml);
            if (relatedArticlesHtml) {
                $('#related-articles').show();
            } else {
                $('#related-articles').hide();
            }


function formatParagraphs(text) {
function formatParagraphs(text) {

Navigation menu