Manual:Hooks/ResourceLoaderGetConfigVars

Details
ResourceLoaderStartUpModule::getConfig runs this hook. Use it to export static configuration variables to JavaScript. Values that depend on the current page, user or request state must be added through instead.


 * &$vars: Array of variables to be added into the output of the startup module.

Example
Register the configuration variables from the hook:

Retrieve them using mw.config, like: