summaryrefslogtreecommitdiff
path: root/resources/src/mediawiki/mediawiki.hlist.js
blob: 8ba57f6f4b04bed91d8eecb7add49e425f99246a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*!
 * .hlist fallbacks for IE 8.
 * @author [[User:Edokter]]
 */
( function ( mw, $ ) {
	var profile = $.client.profile();

	if ( profile.name === 'msie' && profile.versionNumber === 8 ) {
		/* Add pseudo-selector class to last-child list items */
		mw.hook( 'wikipage.content' ).add( function ( $content ) {
			$content.find( '.hlist' ).find( 'dd:last-child, dt:last-child, li:last-child' )
				.addClass( 'hlist-last-child' );
		} );
	}
}( mediaWiki, jQuery ) );