MediaWiki:Gadget-MobileScript.js: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
 
Line 32: Line 32:
if ($.trim($('section:nth-last-of-type(2) .succession-box').first().prev().text()) == '')
if ($.trim($('section:nth-last-of-type(2) .succession-box').first().prev().text()) == '')
$('section:nth-last-of-type(2) .succession-box').first().prev().css('display', 'none');
$('section:nth-last-of-type(2) .succession-box').first().prev().css('display', 'none');
if ($('section:nth-last-of-type(2) > :not(.succession-box, .mw-empty-elt)').length)
$('section:nth-last-of-type(2) > .succession-box').detach().appendTo('.navbox-section');
$('section:nth-last-of-type(2) > .succession-box').detach().appendTo('.navbox-section');
$('section:nth-last-of-type(2) > .navbox').detach().appendTo('.navbox-section');
if ($('section:nth-last-of-type(2) > :not(.navbox, .mw-empty-elt)').length
  || $('.section-heading:nth-last-of-type(2) > .mw-headline:is(#Sources, #References)').length)
$('section:nth-last-of-type(2) > .navbox').detach().appendTo('.navbox-section');
if ($.trim($('.navbox-section').text()) == '')
$('.navbox-section').attr('style', 'display:none !important');
}
}
});
});