Widget:MoveListTrimmer: Difference between revisions

From Elwiki
mNo edit summary
mNo edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><script>
<includeonly><script>
$('#content h2').nextUntil('h2', 'table, ul').each(function(){
$(function(){
    $('this').prev('h2').addClass('persist');
    $('ul#mw-whatlinkshere-list').prev('h2').addClass('persist');
});
    $('table.mw-prefixindex-list-table').each(function(){
$('#content h2').not('persist').remove();
        var t = $(this).text();
</script></includeonly>
        var h = $(this).prev('h2').children('span.mw-headline').text().replace('Subpages of ', '');
        if(h != t){
            $(this).prev('h2').addClass('persist');
        }
        else{
            $(this).remove();
        }
    });
    $('#content h2').not('.persist').remove();
});</script></includeonly>

Latest revision as of 15:45, 25 May 2015