mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-12 01:10:07 +00:00
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:
parent
b40b3ec4a4
commit
f2ed7a6a53
|
@ -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
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue