MediaWiki:Common.js: Difference between revisions

No edit summary
No edit summary
Line 1,382: Line 1,382:


     var authorBlock = section.children('p').filter(function () {
     var authorBlock = section.children('p').filter(function () {
        return $(this).find('span[style*="float:right"]').length;
    }).first();


         return $(this).find('span[style*="float:right"]').length;
    if (!authorBlock.length) {
         return;
    }
 
    // Hide immediately
    authorBlock.addClass('author-hidden');
 
    setTimeout(function () {
 
        var poemBlock = section.children('.Poem2-Ekatra').first();


    }).first();
        if (poemBlock.length) {


    var poemBlock = section.children('.Poem2-Ekatra').first();
            poemBlock.after(authorBlock);


    if (authorBlock.length && poemBlock.length) {
            // Show after moving
            authorBlock.removeClass('author-hidden');


        poemBlock.after(authorBlock);
            console.log('Author block moved');


         console.log('Author block moved');
         }


     }
     }, 100);


});
});