MediaWiki:Common.js: Difference between revisions

No edit summary
Tag: Reverted
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1,388: Line 1,388:


/*---------------------------22-06-2026---------------------------------------*/
/*---------------------------22-06-2026---------------------------------------*/
/* new block */
$(function () {
$(function () {


     $('.ekatra-right-author').each(function () {
     $('.ekatra-right-author').each(function () {


         var $next = $(this).next('p');
         // Remove blank <p> inside Poem2 after author
        $(this).nextAll('p').each(function () {
            var html = $.trim($(this).html());


        if (
            if (html === '' || html === '<br>' || html === '<br/>' || html === '<br />') {
            $next.length &&
                $(this).remove();
             $next.find('br').length &&
            } else {
            $.trim($next.text()) === ''
                return false;
        ) {
             }
             $next.remove();
        });
 
        // Remove blank <p><br></p> after Poem2 block
        var p = $(this).closest('.Poem2-Ekatra').next('p');
 
        if (p.length && p.find('br').length) {
             p.remove();
         }
         }