Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -443,15 +443,11 @@ |
444 | 444 | basename( dirname( __FILE__ ) ) . '/' . $script['src'], $script['version'] |
445 | 445 | ); |
446 | 446 | } |
447 | | - // Preferences (maybe the UsabilityInitiative class could do most of this for us?) |
448 | | - $wgOut->addScript( |
449 | | - Xml::tags( |
450 | | - 'script', |
451 | | - array( 'type' => $wgJsMimeType ), |
452 | | - 'var wgWikiEditorPreferences = ' . FormatJson::encode( $preferences, true ) . ";\n" . |
453 | | - 'var wgWikiEditorEnabledModules = ' . FormatJson::encode( $enabledModules, true ) . ';' |
454 | | - ) |
455 | | - ); |
| 447 | + // Preferences |
| 448 | + UsabilityInitiativeHooks::addVariables( array( |
| 449 | + 'wgWikiEditorPreferences' => $preferences, |
| 450 | + 'wgWikiEditorEnabledModules' => $enabledModules, |
| 451 | + ) ); |
456 | 452 | return true; |
457 | 453 | } |
458 | 454 | |