Jdlrobson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/53282


Change subject: put css before js
......................................................................

put css before js

make sure the css doesn't get blocked by javascript loads...

Change-Id: I04fa6b1baf56b6d7c6709f1e43334f58843684a3
---
M includes/skins/SkinMobile.php
1 file changed, 10 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/82/53282/1

diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php
index 4ddc72e..bf6c9f2 100644
--- a/includes/skins/SkinMobile.php
+++ b/includes/skins/SkinMobile.php
@@ -239,6 +239,16 @@
                $moduleNames = $this->getEnabledModules( $wgResourceModules, 
$title );
                $contextModules = $this->attachAdditionalPageResources( $title, 
$context );
 
+               // attach styles
+               $headLinks[] = $this->resourceLoaderLink( array( 
'mobile.styles' ), 'styles', $target='mobile' );
+               if ( count( $contextModules['top'] > 0 ) ) {
+                       $headLinks[] = $this->resourceLoaderLink( 
$contextModules['top'], 'styles', $target='mobile' );
+               }
+               // add device specific css file - add separately to avoid cache 
fragmentation
+               if ( $device->moduleName() ) {
+                       $headLinks[] = $this->resourceLoaderLink( 
$device->moduleName(), 'styles', $target='mobile' );
+               }
+
                // attach modules
                if ( $rlSupport ) {
                        // Initialize ResourceLoader, targeted to mobile...
@@ -272,15 +282,6 @@
                        $bottomScripts .= $out->getBottomScripts();
                } else {
                        $bottomScripts = '';
-               }
-               // attach styles
-               $headLinks[] = $this->resourceLoaderLink( array( 
'mobile.styles' ), 'styles', $target='mobile' );
-               if ( count( $contextModules['top'] > 0 ) ) {
-                       $headLinks[] = $this->resourceLoaderLink( 
$contextModules['top'], 'styles', $target='mobile' );
-               }
-               // add device specific css file - add separately to avoid cache 
fragmentation
-               if ( $device->moduleName() ) {
-                       $headLinks[] = $this->resourceLoaderLink( 
$device->moduleName(), 'styles', $target='mobile' );
                }
 
                $headHtml = implode( "\n", $headLinks );

-- 
To view, visit https://gerrit.wikimedia.org/r/53282
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I04fa6b1baf56b6d7c6709f1e43334f58843684a3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to