MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
m (1 revision imported)
No edit summary
Line 1,101: Line 1,101:
}
}
      
      
    // NRS ENTRIES  ---------------------  SECTION //
    if ($("#show-article-wrapper-entry").length) {
        // Function to remove white spaces from paragraphs
        function formatParagraphs(text) {
            return text.replace(/\s+/g, ' ').trim();
        }
        // Check if ".article-description" exists and format its text
        if ($(".article-description").length) {
            var descriptionText = $(".article-description").text();
            $(".article-description").text(formatParagraphs(descriptionText));
        }
        // Check if ".article-reflection" exists and format its text
        if ($(".article-reflection").length) {
            var reflectionText = $(".article-reflection").text();
            $(".article-reflection").text(formatParagraphs(reflectionText));
        }
    }
     // SEARCH  ---------------------  SECTION //
     // SEARCH  ---------------------  SECTION //
     // Check if div with class "mw-search-results-info" exists
     // Check if div with class "mw-search-results-info" exists

Navigation menu