Topic on User talk:BDavis (WMF)

Jump to navigation Jump to search
Skalman (talkcontribs)

Hi, we spoke about cross-wiki gadgets at Wikimania. Krinkle showed me a way to load the whole gadget+dependencies minified. It even supports automatic RTL conversion, using the user language.

// [[File:Krinkle_RTRC.js]]
(mw.loader.getState('ext.gadget.rtrc') ? mw.loader.load('ext.gadget.rtrc') : mw.loader.load('' + mw.config.get('wgUserLanguage', 'en')));

The initial check is for loading a local version of the gadget, if such a version exists. Otherwise, it'll load the gadget from

Example taken from meta:User:Krinkle/Tools/Real-Time Recent Changes.

BDavis (WMF) (talkcontribs)
Reply to "Cross-wiki gadgets"