From 78ed6a32afe9620b9714a1f63e888ff4f7596897 Mon Sep 17 00:00:00 2001 From: Gilles Dubuc Date: Tue, 28 Apr 2015 16:03:20 +0200 Subject: [PATCH] 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 --- Math.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Math.php b/Math.php index 85cff5b..3f45333 100644 --- a/Math.php +++ b/Math.php @@ -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',