Don't load mediawiki.ui.button on page load (attempt 2)

The stylesheet is needed on legacy Vector but not modern
Vector 2022 meaning Vector 2022 loads two sets of styles
for buttons.

This is a short term fix until UniversalLanguageSelector can
use Codex.

Bug: T340255
Change-Id: Ie34949e31e93dcfcabc07fa418dec06022159ca7
This commit is contained in:
Jon Robson authored and Jdlrobson committed 2023-07-17 21:28:23 +00:00
1 parent d7d63236fd
commit 76e7805881
3 files changed
+4 -3

No files matched your search

+1 -2
View File
@@ -172,8 +172,7 @@
"dependencies": [
"mediawiki.jqueryMsg",
"mediawiki.language",
"ext.uls.common",
"mediawiki.ui.button"
"ext.uls.common"
],
"messages": [
"ext-uls-compact-link-count",
+2
View File
@@ -190,7 +190,9 @@
this.compactList[ language ].parentNode.style.display = '';
}
mw.loader.using( 'mediawiki.ui.button' ).then( function () {
this.addTrigger();
}.bind( this ) );
mw.hook( 'mw.uls.compactlinks.initialized' ).fire( true );
};
+1 -1
View File
@@ -578,7 +578,7 @@
ev.preventDefault();
mw.loader.using( 'ext.uls.mediawiki' ).then( function () {
mw.loader.using( [ 'ext.uls.mediawiki', 'mediawiki.ui.button' ] ).then( function () {
var parent, languageNodes, standalone, uls;
parent = document.querySelectorAll( '.mw-portlet-lang, #p-lang' )[ 0 ];