Try this: https://gist.github.com/2974946 (Caveat: I'm new to MediaWiki development so this could be wrong or suboptimal.)
On Friday, June 22, 2012 at 12:19 PM, Daniel Werner wrote: > I was wondering whether it is possible somehow to register a javascript var > for a certain resource loader module in php? There is the > OuputPage::addJsConfigVars function but I didn't find anything to only load > a var only conditionally when a module is loaded. Right now I am > registering a variable in the ResourceLoaderGetConfigVars hook, but > actually, I only want to have it included when the 'wikibase' module is > loaded since it is rather big and shouldn't be loaded when not necessary. > > -- > Daniel Werner > Software Engineer > > Wikimedia Deutschland e.V. | NEU: Obentrautstr. 72 | 10963 Berlin > Tel. (030) 219 158 26-0 > > http://wikimedia.de > > Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e.V. > Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter > der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für > Körperschaften I Berlin, Steuernummer 27/681/51985. > _______________________________________________ > Wikitech-l mailing list > Wikitech-l@lists.wikimedia.org (mailto:Wikitech-l@lists.wikimedia.org) > https://lists.wikimedia.org/mailman/listinfo/wikitech-l > > _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l