Don't force #p-lang to show using jQuery.fn.show

It's a performance anti-pattern; see
<https://github.com/jquery/jquery.com/issues/88#issuecomment-72400007>

Change-Id: If6e521c27975f7d64932268fde5778aa63fd08ee
This commit is contained in:
Ori Livneh
2015-03-07 18:29:51 -08:00
parent a672e1fa11
commit 57b617f775

View File

@@ -315,8 +315,8 @@
$pLang = $( '#p-lang' ); $pLang = $( '#p-lang' );
// Add an element near the interlanguage links header // Add an element near the interlanguage links header
$ulsTrigger = $( '<span>' ).addClass( 'uls-settings-trigger' ); $ulsTrigger = $( '<span>' ).addClass( 'uls-settings-trigger' );
// Append ULS cog to languages section, but make sure it is visible. // Append ULS cog to languages section.
$pLang.show().prepend( $ulsTrigger ); $pLang.prepend( $ulsTrigger );
// Take care of any other elements with this class. // Take care of any other elements with this class.
$ulsTrigger = $( '.uls-settings-trigger' ); $ulsTrigger = $( '.uls-settings-trigger' );
// Remove the dummy link, which was added to make sure that the section appears // Remove the dummy link, which was added to make sure that the section appears