MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
 
Line 1,169: Line 1,169:
         // Check if ".article-description" exists and format its text
         // Check if ".article-description" exists and format its text
         if ($(".article-description").length) {
         if ($(".article-description").length) {
            console.log("Element with class 'article-description' found!"); // Check if the target element exists
             var descriptionText = $(".article-description").text();
             var descriptionText = $(".article-description").text();
            console.log("Original description text:", descriptionText); // Log the original text
             var formattedDescription = formatParagraphs(descriptionText);
             var formattedDescription = formatParagraphs(descriptionText);
            console.log("Formatted description text:", formattedDescription); // Log the formatted text
             $(".article-description").html(formattedDescription); // Set the formatted text
             $(".article-description").html(formattedDescription); // Set the formatted text
         }
         }
Line 1,179: Line 1,176:
         // Check if ".article-reflection" exists and format its text
         // Check if ".article-reflection" exists and format its text
         if ($(".article-reflection").length) {
         if ($(".article-reflection").length) {
            console.log("Element with class 'article-reflection' found!"); // Check if the target element exists
             var reflectionText = $(".article-reflection").text();
             var reflectionText = $(".article-reflection").text();
            console.log("Original reflection text:", reflectionText); // Log the original text
             var formattedReflection = formatParagraphs(reflectionText);
             var formattedReflection = formatParagraphs(reflectionText);
            console.log("Formatted reflection text:", formattedReflection); // Log the formatted text
             $(".article-reflection").html(formattedReflection); // Set the formatted text
             $(".article-reflection").html(formattedReflection); // Set the formatted text
         }
         }

Navigation menu