Участник:VasilievVV/uncollapseTabs.js

Материал из Википедии — свободной энциклопедии
Перейти к навигации Перейти к поиску
if ( skin == 'vector' ) {
	addOnloadHook( function() {
		$( '#p-cactions li a' ).each( function() {
			if ( $( this ).children().length == 0 ) {
				$( this ).parent().html( $( '<span />' ).html( $( this ).parent().html() ) );
			}
		} );

		var $tabs = $( '#p-cactions li' ).addClass( 'collapsible' );
		var $watch = $( '#p-views ul #ca-watch, #p-views ul #ca-unwatch' );
		if ( $watch.length ) {
			$tabs.insertBefore( $watch );
		} else {
			$tabs.appendTo( $( '#p-views ul' ) );
		}
		$.collapsibleTabs.handleResize();
	} );
        mw.util.addCSS( '#p-cactions { display: none }' );
}