From: jdlrobson Date: Fri, 30 Jun 2017 19:27:04 +0000 (-0700) Subject: resourceloader: Allow mobile target by default on SkinModule X-Git-Tag: 1.31.0-rc.0~2819^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=2f1050622ac263a30cb02417ec2ce9da6aa4ee06;p=lhc%2Fweb%2Fwiklou.git resourceloader: Allow mobile target by default on SkinModule If a skin is using this class, it's likely to be pretty new. The targets system was mostly created for older code. Let's make this the default so skins don't need to do anything additional to work on mobile. This simple change makes the Timeless skin work on mobile when MobileFrontend is installed: ?useformat=mobile&useskin=timeless It looks beautiful :) Change-Id: I2ab8a1a634bdc0b5b2084d227c7388b5382e93e8 --- diff --git a/includes/resourceloader/ResourceLoaderSkinModule.php b/includes/resourceloader/ResourceLoaderSkinModule.php index 5740925d2a..1967a95714 100644 --- a/includes/resourceloader/ResourceLoaderSkinModule.php +++ b/includes/resourceloader/ResourceLoaderSkinModule.php @@ -22,6 +22,10 @@ */ class ResourceLoaderSkinModule extends ResourceLoaderFileModule { + /** + * All skins are assumed to be compatible with mobile + */ + public $targets = [ 'desktop', 'mobile' ]; /** * @param ResourceLoaderContext $context