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
2022-01-14 12:43:49 +05:30
committed by jenkins-bot
parent faa322d5c6
commit 5bd64b167c

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() {