mediawiki.hlist: Remove IE6 & 7 fallbacks
authorKunal Mehta <legoktm@gmail.com>
Fri, 17 Oct 2014 17:51:39 +0000 (10:51 -0700)
committerKunal Mehta <legoktm@gmail.com>
Fri, 17 Oct 2014 17:51:39 +0000 (10:51 -0700)
Change-Id: I47e54f169f311b4f8211a6deef13704c97e43b06

resources/src/mediawiki/mediawiki.hlist.js

index 0bbf8fa..8ba57f6 100644 (file)
@@ -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( '<b>·</b> ' );
-                               $hlists.find( 'li:not(:last-child)' )
-                                       .append( '<b>·</b> ' );
-                               $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 ) );