MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 60: Line 60:
});
});


 
    // Format paragraphs
     function formatParagraphs(text) {
     function formatParagraphs(text) {
    var paragraphs = text.split('\n').filter(function (p) { return p.trim() !== '' });
    var paragraphs = text.split('\n').filter(function (p) { return p.trim() !== '' });
Line 70: Line 70:
    formatCommunityCardDescriptions();
    formatCommunityCardDescriptions();
}
}
   
 
function formatCommunityCardDescriptions() {
function formatCommunityCardDescriptions() {
    console.log("Formatting community card descriptions");
    console.log("Formatting community card descriptions");
Line 96: Line 96:
     var filtersDiv = $('.filtered-filters');
     var filtersDiv = $('.filtered-filters');


    // Open and Close button for filters
     if (toggleButton.length && filtersDiv.length) {
     if (toggleButton.length && filtersDiv.length) {
        console.log("Button and Filters div found with jQuery.");
         toggleButton.on('click', function(event) {
         toggleButton.on('click', function(event) {
             event.preventDefault();
             event.preventDefault();
Line 113: Line 112:
             }
             }
         });
         });
    } else {
     }  
        console.log("Button or Filters div not found with jQuery.");
     }
      
      
     $('.button-open-nrs').click(function() {
     $('.button-open-nrs').click(function() {

Navigation menu