MediaWiki:Common.js: Difference between revisions

No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 1,390: Line 1,390:
$(function () {
$(function () {


     // Remove <p><br></p> after author name
     // Remove all blank paragraphs after author name
     $('.ekatra-right-author').each(function () {
     $('.ekatra-right-author').each(function () {
        var p = $(this).next();


         if (p.is('p') && p.find('br').length) {
         $(this).nextAll('p').each(function () {
            p.remove();
 
         }
            var p = $(this);
 
            if ($.trim(p.text()) === '') {
                p.remove();
            } else {
                return false;
            }
 
         });
 
     });
     });


     // Remove <p><br></p> before HeaderNav2
     // Remove all blank paragraphs before HeaderNav2
     $('.header-mainblock').each(function () {
     $('.header-mainblock').each(function () {
        var p = $(this).prev();


         if (p.is('p') && p.find('br').length) {
         $(this).prevAll('p').each(function () {
            p.remove();
 
         }
            var p = $(this);
 
            if ($.trim(p.text()) === '') {
                p.remove();
            } else {
                return false;
            }
 
         });
 
     });
     });


});
});