Allow disabling of the new compact languages button

Depends-On: I726c61d4c6895a28b999781752535e0ddc961744
Bug: T282149
Change-Id: I436554d9d51470d277d59c2c71e08124735e12fd
This commit is contained in:
jdlrobson 2021-05-14 08:04:28 -07:00 committed by Jdlrobson
parent 99a201d5b9
commit 0b024a4a4d
1 changed files with 4 additions and 1 deletions

View File

@ -12,7 +12,10 @@ function disableLanguageDropdown() {
if ( !pLangBtn ) {
return;
}
if ( !pLangBtn.querySelectorAll( '.mw-interlanguage-selector' ).length ) {
// The ext.uls.interface module removed the selector, because the feature is disabled. Do nothing.
return;
}
pLangBtn.classList.add( 'vector-menu--hide-dropdown' );
} );
} else {