Don't load unused Echo JS/CSS on mobile

MobileFrontend has its own implementation of the notifications
flyout, so don't load any of Echo's code. We do still need
ext.echo.nojs on Special:Notifications though.

Bug: T112571
Change-Id: If4d84810070ccd48a8007a3ff80733a7db30fdb3
This commit is contained in:
Roan Kattouw 2015-09-14 23:12:59 +02:00
parent b40b3ec4a4
commit f2ed7a6a53
2 changed files with 3 additions and 3 deletions

View file

@ -585,7 +585,7 @@ class EchoHooks {
* @return bool true in all cases
*/
static function beforePageDisplay( $out, $skin ) {
if ( $out->getUser()->isLoggedIn() ) {
if ( $out->getUser()->isLoggedIn() && $skin->getSkinName() !== 'minerva' ) {
// Load the module for the Notifications flyout
$out->addModules( array( 'ext.echo.init' ) );
// Load the styles for the Notifications badge

View file

@ -75,7 +75,7 @@ $wgResourceModules += array(
'tooltip-pt-notifications-message',
'mypreferences'
),
'targets' => array( 'desktop', 'mobile' ),
'targets' => array( 'desktop' ),
),
'ext.echo.dm' => $echoResourceTemplate + array(
'scripts' => array(
@ -111,7 +111,7 @@ $wgResourceModules += array(
'dependencies' => array(
'ext.echo.ui'
),
'targets' => array( 'desktop', 'mobile' ),
'targets' => array( 'desktop' ),
),
// Base no-js styles
'ext.echo.nojs' => $echoResourceTemplate + array(