Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.php |
— | — | @@ -8,9 +8,9 @@ |
9 | 9 | * This file contains the main include file for the UsabilityInitiative |
10 | 10 | * extension of MediaWiki. |
11 | 11 | * |
12 | | - * Usage: Inlcude the modules you want to use specifically by adding a line in |
| 12 | + * Usage: Include the modules you want to use specifically by adding a line in |
13 | 13 | * LocalSettings.php for each of them like this: |
14 | | - * require_once( "$IP/extensions/UsabilityInitiative/EditToolbar/EditToolbar.php" ); |
| 14 | + * require_once( "$IP/extensions/UsabilityInitiative/Vector/Vector.php" ); |
15 | 15 | * |
16 | 16 | * @author Trevor Parscal <tparscal@wikimedia.org> |
17 | 17 | * Allow "or a later version" here? |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php |
— | — | @@ -70,6 +70,13 @@ |
71 | 71 | global $wgUser, $wgJsMimeType, $wgOut; |
72 | 72 | global $wgVectorModules, $wgUsabilityInitiativeResourceMode; |
73 | 73 | |
| 74 | + // Don't load Vector modules for non-Vector skins |
| 75 | + // They won't work but will throw unused JS in the client's face |
| 76 | + // Using instanceof to catch any skins subclassing Vector |
| 77 | + if ( !$wgUser->getSkin() instanceof SkinVector ) { |
| 78 | + return true; |
| 79 | + } |
| 80 | + |
74 | 81 | // Modules |
75 | 82 | $preferences = array(); |
76 | 83 | $enabledModules = array(); |