Index: trunk/phase3/resources/mediawiki/mediawiki.js |
— | — | @@ -1298,13 +1298,31 @@ |
1299 | 1299 | * |
1300 | 1300 | * @param module string name of module to get version for |
1301 | 1301 | */ |
1302 | | - this.version = function( module ) { |
| 1302 | + this.getVersion = function( module ) { |
1303 | 1303 | if ( module in registry && 'version' in registry[module] ) { |
1304 | 1304 | return formatVersionNumber( registry[module].version ); |
1305 | 1305 | } |
1306 | 1306 | return null; |
1307 | 1307 | }; |
| 1308 | + /** |
| 1309 | + * @deprecated use mw.loader.getVersion() instead |
| 1310 | + */ |
| 1311 | + this.version = function() { |
| 1312 | + return mediaWiki.loader.getVersion.apply( mediaWiki.loader, arguments ); |
| 1313 | + } |
1308 | 1314 | |
| 1315 | + /** |
| 1316 | + * Gets the state of a module |
| 1317 | + * |
| 1318 | + * @param module string name of module to get state for |
| 1319 | + */ |
| 1320 | + this.getState = function( module ) { |
| 1321 | + if ( module in registry && 'state' in registry[module] ) { |
| 1322 | + return registry[module].state; |
| 1323 | + } |
| 1324 | + return null; |
| 1325 | + }; |
| 1326 | + |
1309 | 1327 | /* Cache document ready status */ |
1310 | 1328 | |
1311 | 1329 | $(document).ready( function() { ready = true; } ); |