[Solved] The meaning of ua and mw in JavaScript


In a MediaWiki context, mw is a global object containing a number of Javascript methods and properties, that other javascript modules can make use of. If, for instance, you are adding Javascript code to MediaWiki:Common.js, you will always be able to access the mw variable. (Read more about MediaWiki JS modules here.)

The mw.config in your code snippet contains a number of configuration values, such as mw.config.skin, with the name of the currently used skin.

The mw.loader is an interface for the MediaWiki Resource loader, that can be used to load other Javascript modules, while handling dependencies, minifications, etc for you.

As for us, it is, as already pointed out, defined right in front of you…

1

solved The meaning of ua and mw in JavaScript