Index: trunk/phase3/resources/mediawiki/mediawiki.js |
— | — | @@ -728,6 +728,18 @@ |
729 | 729 | } |
730 | 730 | }; |
731 | 731 | |
| 732 | + /** |
| 733 | + * Gets the version of a module |
| 734 | + * |
| 735 | + * @param string module name of module to get version for |
| 736 | + */ |
| 737 | + this.version = function( module ) { |
| 738 | + if ( module in registry && 'version' in registry[module] ) { |
| 739 | + return formatVersionNumber( registry[module].version ); |
| 740 | + } |
| 741 | + return null; |
| 742 | + } |
| 743 | + |
732 | 744 | /* Cache document ready status */ |
733 | 745 | |
734 | 746 | $(document).ready( function() { ready = true; } ); |