Topic on Extension talk:Gadgets

Jump to navigation Jump to search
Tinker Bell (talkcontribs)

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?

Jdforrester (WMF) (talkcontribs)

MobileFrontend doesn't load any gadgets, ever.

Tinker Bell (talkcontribs)

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.

Od1n (talkcontribs)

@Jdforrester (WMF) Could you please elaborate on this? What is the purpose of targets=mobile then?

Jdforrester (WMF) (talkcontribs)

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.)

Od1n (talkcontribs)

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.

Reply to "targets=mobile"