r66467 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66466‎ | r66467 | r66468 >
Date:12:32, 15 May 2010
Author:ialex
Status:ok
Tags:
Comment:
Vector: put javascript variables with other variables and not in their own script tag
Modified paths:
  • /trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php
@@ -137,15 +137,11 @@
138138 basename( dirname( __FILE__ ) ) . '/' . $script['src'], $script['version']
139139 );
140140 }
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+ ) );
150146 return true;
151147 }
152148

Follow-up revisions

RevisionCommit summaryAuthorDate
r66468WikiEditor: same as r66467: put javascript variables with other variablesialex12:59, 15 May 2010

Status & tagging log