Index: trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php |
— | — | @@ -137,15 +137,11 @@ |
138 | 138 | basename( dirname( __FILE__ ) ) . '/' . $script['src'], $script['version'] |
139 | 139 | ); |
140 | 140 | } |
141 | | - // Preferences (maybe the UsabilityInitiative class could do most of this for us?) |
142 | | - $wgOut->addScript( |
143 | | - Xml::tags( |
144 | | - 'script', |
145 | | - array( 'type' => $wgJsMimeType ), |
146 | | - 'var wgVectorPreferences = ' . FormatJson::encode( $preferences, true ) . ";\n" . |
147 | | - 'var wgVectorEnabledModules = ' . FormatJson::encode( $enabledModules, true ) . ';' |
148 | | - ) |
149 | | - ); |
| 141 | + // Preferences |
| 142 | + UsabilityInitiativeHooks::addVariables( array( |
| 143 | + 'wgVectorPreferences' => $preferences, |
| 144 | + 'wgVectorEnabledModules' => $enabledModules, |
| 145 | + ) ); |
150 | 146 | return true; |
151 | 147 | } |
152 | 148 | |