diff --git a/resources/skins.vector.js/languageButton.js b/resources/skins.vector.js/languageButton.js index 9c930d8..351c0cd 100644 --- a/resources/skins.vector.js/languageButton.js +++ b/resources/skins.vector.js/languageButton.js @@ -19,40 +19,9 @@ function addInterwikiLinkToSidebar() { } } -/** - * Disable dropdown behaviour for non-JS users. - * - * @param {HTMLElement|null} pLangBtn - * @return {void} - */ -function disableDropdownBehavior( pLangBtn ) { - if ( !pLangBtn ) { - return; - } - pLangBtn.classList.add( 'vector-menu-hide-dropdown' ); -} - -/** - * Checks whether ULS is enabled and if so disables the default - * drop down behavior of the button. - */ -function disableLanguageDropdown() { - var ulsModuleStatus = mw.loader.getState( 'ext.uls.interface' ); - - // If module status is defined and not registered we can assume it is in the process of loading - if ( ulsModuleStatus && ulsModuleStatus !== 'registered' ) { - // HACK: Ideally knowledge of internal ULS configuration would not be necessary - // In future this should be wired up to an `mw.hook` event. - if ( mw.config.get( 'wgULSisCompactLinksEnabled' ) ) { - disableDropdownBehavior( document.getElementById( 'p-lang-btn' ) ); - } - } -} - /** * Initialize the language button. */ module.exports = function () { - disableLanguageDropdown(); addInterwikiLinkToSidebar(); }; diff --git a/resources/skins.vector.styles/components/LanguageButton.less b/resources/skins.vector.styles/components/LanguageButton.less index 1dd86a5..7ce09de 100644 --- a/resources/skins.vector.styles/components/LanguageButton.less +++ b/resources/skins.vector.styles/components/LanguageButton.less @@ -65,17 +65,6 @@ } } -// mw-body-header class can be removed when language button is the default. -// e.g. upon removal of SkinVector::isLanguagesInHeader -.client-js #p-lang-btn { - // When the ext.uls.interface module is loaded, we hide the fallback menu and checkbox. - &.vector-menu-hide-dropdown { - .vector-menu-content { - display: none; - } - } -} - // Hides language button with CSS, ensures language button is in DOM for temporary JS hack for interwiki links // Temporary solution to T287206, can be removed when ULS dialog includes interwiki links #p-lang-btn.mw-portlet-empty {