16,836
edits
mNo edit summary |
mNo edit summary |
||
Line 30: | Line 30: | ||
$(function() { | $(function() { | ||
if ($('.navbox-section').length) { | if ($('.navbox-section').length) { | ||
if ($('section:nth-last-of-type(2) > | if ($('section:nth-last-of-type(2) > :not(.navbox):not(.mw-empty-elt)').length | ||
|| $('.section-heading:nth-last-of-type(2) > .mw-headline | || $('.section-heading:nth-last-of-type(2) > .mw-headline:is(#Sources, #References)').length) | ||
$('section:nth-last-of-type(2) > .navbox').detach().appendTo('.navbox-section'); | $('section:nth-last-of-type(2) > .navbox').detach().appendTo('.navbox-section'); | ||
if ($.trim($('.navbox-section').text()) == '') { | if ($.trim($('.navbox-section').text()) == '') { |