[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wikitech-l
Subject:    Re: [Wikitech-l] Conditional resource loading
From:       Mark Holmquist <mtraceur () member ! fsf ! org>
Date:       2013-09-30 21:38:11
Message-ID: 20130930213811.GC24507 () marktraceur ! info
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Mon, Sep 30, 2013 at 09:27:29PM +0000, Amelia Ireland wrote:
> I've already used this method with one of the extensions. Is there anything
> on the backend / PHP side so that I can advantage of ResourceLoader script
> compression? It seems like it should be possible, but I don't have a 
> thorough-enough knowledge of the innards of Mediawiki, and I can't find
> anything in the docs on this topic.

As long as you know that the extension is enabled before the page loads
or the user takes any actions, you can simply find out where the modules
are added to the OutputPage (look/grep for "addModules") and wrap it in
an appropriate if statement/block. I don't think ResourceLoader itself
has any nice methods to do this for you, but I also don't think it's a
particularly useful feature, given the ease with which developers can
do it themselves...

-- 
Mark Holmquist
Software Engineer, Multimedia
Wikimedia Foundation
mtraceur@member.fsf.org
https://wikimediafoundation.org/wiki/User:MHolmquist

["signature.asc" (application/pgp-signature)]
[Attachment #6 (text/plain)]

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic