MediaWiki:Common.js : Différence entre versions

Ligne 8 : Ligne 8 :
 
  * @author [[User:Edokter]]
 
  * @author [[User:Edokter]]
 
  */
 
  */
/*
 
 
( function ( mw, $ ) {
 
( function ( mw, $ ) {
 
     var profile = $.client.profile();
 
     var profile = $.client.profile();
Ligne 18 : Ligne 17 :
 
     }
 
     }
 
} ( mediaWiki, jQuery ) );
 
} ( mediaWiki, jQuery ) );
 
+
/*
 
jQuery(function($){ if ( mw.user.isAnon() ) {
 
jQuery(function($){ if ( mw.user.isAnon() ) {
 
$('#p-tb').hide(); //id or class varies with skin
 
$('#p-tb').hide(); //id or class varies with skin
 
} } );
 
} } );
 
*/
 
*/

Version du 18 avril 2015 à 20:37

/* Tout JavaScript ici sera chargé avec chaque page accédée par n’importe quel utilisateur. */

/**
 * Helper script for .hlist class in Common.css
 * Add pseudo-selector class to last-child list items in IE8
 * @source mediawiki.org/wiki/Snippets/Horizontal_lists
 * @revision 6 (2014-08-23)
 * @author [[User:Edokter]]
 */
( function ( mw, $ ) {
    var profile = $.client.profile();
    if ( profile.name === 'msie' && profile.versionNumber === 8 ) {
        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 ) );
/*
jQuery(function($){ if ( mw.user.isAnon() ) {
$('#p-tb').hide(); //id or class varies with skin
} } );
*/