Compact language links module is loaded via server side

This provides an alternative mechanism to
I0518ecdf402ebf5eb6bad2c430f6462322c0d8e1 for loading the compact
language link module. Instead of relying on the client, the HTML
is inspected.

Bug: T264824
Change-Id: I977a998388b3e70f7fe4d97fa05be3c1ac1bf676
This commit is contained in:
jdlrobson authored and jenkins-bot committed 2020-11-18 17:07:59 +00:00
1 parent ab6decae11
commit d69d5773e5
2 files changed
+11 -20

No files matched your search

-18
View File
@@ -443,23 +443,6 @@
} );
}
/**
* Compact the language list if necessary
*/
function compactLanguageLinksList() {
if (
// Allow skins to register their own button, in which case no need to compact
!document.querySelector( '.mw-interlanguage-selector' ) && (
// This line is for cached HTML where the JS config variable is not available
// it can be removed a week after this code has been in production.
mw.loader.getState( 'ext.uls.compactlinks' ) !== 'registered' ||
mw.config.get( 'wgULSCompactLinksEnabled' )
)
) {
mw.loader.using( 'ext.uls.compactlinks' );
}
}
/**
* Event handler for the language button
* @param {jQuery.Event} ev
@@ -494,7 +477,6 @@
initInterface();
initTooltip();
initIme();
compactLanguageLinksList();
initInterlanguageSelector();
}