MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Tag: Reverted
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();
             // Fetching related articles content
             // Fetching and handling related articles content
    var relatedArticlesHtml = $(this).find('.related-articles').html();
            var relatedArticlesContent = $(this).find('.related-articles').html() || '';
           
    // Check if the related-articles div has content
            if (relatedArticlesContent.trim() === '') {
    if (relatedArticlesHtml && relatedArticlesHtml.trim().length > 0) {
                relatedArticlesContent = '<p>No related articles found.</p>';
        $('#related-articles').html(relatedArticlesHtml).show();
            }
    } else {
 
        $('#related-articles').html('<p>No related articles found.</p>').show();
            // Append the related articles content to the modal
    }
            $('#related-articles').html(relatedArticlesContent);


             // Update the fixed column content
             // Update the fixed column content

Navigation menu