Improve the loading time of ULS language selector by fetching modules early

Start fetching them on mouseover without waiting for click.

Bug: T299202
Change-Id: I1ba3b8516bd01ad1bf8bb4c57d72d10ca59e06ca
This commit is contained in:
Santhosh Thottingal authored and jenkins-bot committed 2022-01-27 14:31:07 +00:00
1 parent faa322d5c6
commit 5bd64b167c
1 file changed
+4
+4
View File
@@ -378,6 +378,10 @@
}
$trigger.on( 'click', clickHandler );
// Optimization: Prefetch the Resource loader modules for ULS on mouseover
$trigger.one( 'mouseover', function () {
mw.loader.load( languageSettingsModules );
} );
}
function initLanguageChangeUndoTooltip() {