When defining a gadget, I suppose if I type targets=mobile
, that gadget will be loaded only on mobile devices, just like MobileFrontend works. But that doesn't happen, so, what does targets=mobile
do? Am I missing something?
Topic on Extension talk:Gadgets
MobileFrontend doesn't load any gadgets, ever.
Jdforrester, I just mentioned MobileFrontend as an analogy, MF serves a different interface based on the device type (desktop or mobile). I thought targets=mobile
do the same with gadgets.
@Jdforrester (WMF) Could you please elaborate on this? What is the purpose of targets=mobile
then?
It's a hack to reduce the number of ResourceLoader manifests shipped to mobile readers, on the basis that it's a significant source of bloat. We're planning long-term to remove the targets system entirely. (Note that MF does now let you load mobile gadgets.)
So, it works as expected actually? I couldn't confirm by looking at the code and commits, but I tried with some defined gadgets, and indeed they are loadable on mobile iif they have the targets=mobile
.