-
- // Include instead of require, as this will work without it, it will just look bad.
- // We need the 'global' statement for $wgResourceModules because the Vector skin adds the
- // definitions for its RL modules there that we use implicitly below.
-
- // @codingStandardsIgnoreStart
- global $wgResourceModules; // This is NOT UNUSED!
- // @codingStandardsIgnoreEnd
-
- include_once "$wgStyleDirectory/Vector/Vector.php";
+ $registry = new ExtensionRegistry();
+ $data = $registry->readFromQueue( [
+ "$wgStyleDirectory/Vector/skin.json" => 1,
+ ] );
+ if ( isset( $data['globals']['wgResourceModules'] ) ) {
+ $resourceLoader->register( $data['globals']['wgResourceModules'] );
+ }