Merge "Document the wikipage.content hook"
[mediawiki.git] / resources / mediawiki / mediawiki.hlist.js
blobef981367e576ebff66d23be7e670ed5843214f59
1 /**
2         IE 8: Add pseudo-selector class to last-child list items
3         @author [[User:Edokter]]
4 */
5 jQuery( function( $ ) {
6         if ( $.client.profile().name === 'msie' ) {
7                 if ( $.client.profile().versionNumber === 8 ) {
8                         $( '.hlist' ).find( 'dd:last-child, dt:last-child, li:last-child' )
9                                 .addClass( 'hlist-last-child' );
10                 }
11                         /* IE 7 and below: Generate interpuncts and parentheses */
12                 if ( $.client.profile().versionNumber <= 7 ) {
13                         var $hlists = $( '.hlist' );
14                         $hlists.find( 'dt:not(:last-child)' )
15                                 .append( ': ' );
16                         $hlists.find( 'dd:not(:last-child)' )
17                                 .append( '<b>·</b> ' );
18                         $hlists.find( 'li:not(:last-child)' )
19                                 .append( '<b>·</b> ' );
20                         $hlists.find( 'dl dl, dl ol, dl ul, ol dl, ol ol, ol ul, ul dl, ul ol, ul ul' )
21                                 .prepend( '( ' ).append( ') ' );
22                 }
23         }
24 } );