Explicitly define module position

Style modules currently added through addModuleStyles default
to being in the head ("top" position). This is an unhealthy default,
since only critical styles that are needed at pageload should be
in the head. In order to be able to switch the default to "bottom",
existing module positions have to be defined explicitly.

Bug: T97410
Change-Id: I39e3388de260bb91506fb9e6f1092f6284d13d0e
This commit is contained in:
Gilles Dubuc 2015-04-28 16:03:20 +02:00
parent 4d04704300
commit 78ed6a32af
1 changed files with 2 additions and 0 deletions

View File

@ -244,12 +244,14 @@ $wgSpecialPages['MathShowImage'] = 'SpecialMathShowImage';
$wgSpecialPages['MathStatus'] = 'SpecialMathStatus';
$wgResourceModules['ext.math.styles'] = array(
'position' => 'top',
'localBasePath' => __DIR__ . '/modules',
'remoteExtPath' => 'Math/modules',
'styles' => 'ext.math.css',
'targets' => array( 'desktop', 'mobile' ),
);
$wgResourceModules['ext.math.desktop.styles'] = array(
'position' => 'top',
'localBasePath' => __DIR__ . '/modules',
'remoteExtPath' => 'Math/modules',
'styles' => 'ext.math.desktop.css',