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