X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki%2Fmediawiki.hlist.js;h=8ba57f6f4b04bed91d8eecb7add49e425f99246a;hb=38ba6b620be9f6333d902055ae1c0c610af4985e;hp=0bbf8fadbfcc9894fdd5275812390bde4a937805;hpb=79ebb4b0288b709fb53cff8f7ebc5f50221931c9;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki/mediawiki.hlist.js b/resources/src/mediawiki/mediawiki.hlist.js index 0bbf8fadbf..8ba57f6f4b 100644 --- a/resources/src/mediawiki/mediawiki.hlist.js +++ b/resources/src/mediawiki/mediawiki.hlist.js @@ -1,31 +1,15 @@ /*! - * .hlist fallbacks for IE 6, 7 and 8. + * .hlist fallbacks for IE 8. * @author [[User:Edokter]] */ ( function ( mw, $ ) { var profile = $.client.profile(); - if ( profile.name === 'msie' ) { - if ( profile.versionNumber === 8 ) { - /* IE 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' ); - } ); - } - else if ( profile.versionNumber <= 7 ) { - /* IE 7 and below: Generate interpuncts and parentheses */ - mw.hook( 'wikipage.content' ).add( function ( $content ) { - var $hlists = $content.find( '.hlist' ); - $hlists.find( 'dt:not(:last-child)' ) - .append( ': ' ); - $hlists.find( 'dd:not(:last-child)' ) - .append( '· ' ); - $hlists.find( 'li:not(:last-child)' ) - .append( '· ' ); - $hlists.find( 'dl dl, dl ol, dl ul, ol dl, ol ol, ol ul, ul dl, ul ol, ul ul' ) - .prepend( '( ' ).append( ') ' ); - } ); - } + 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 ) );