Index: trunk/extensions/CleanChanges/CleanChanges.php |
— | — | @@ -16,6 +16,7 @@ |
17 | 17 | $dir = dirname(__FILE__) . '/'; |
18 | 18 | $wgExtensionMessagesFiles['CleanChanges'] = $dir . 'CleanChanges.i18n.php'; |
19 | 19 | $wgAutoloadClasses['NCL'] = $dir . 'CleanChanges_body.php'; |
| 20 | +$wgJSAutoloadClasses['CleanChanges'] = "extensions/CleanChanges/cleanchanges.js"; |
20 | 21 | |
21 | 22 | /* Hook into code */ |
22 | 23 | $wgHooks['FetchChangesList'][] = 'NCL::hook' ; |
Index: trunk/extensions/CleanChanges/CleanChanges_body.php |
— | — | @@ -28,12 +28,8 @@ |
29 | 29 | } |
30 | 30 | |
31 | 31 | if ( $list instanceof NCL ) { |
32 | | - global $wgOut, $wgScriptPath, $wgJsMimeType, $wgStyleVersion; |
33 | | - $wgOut->addScript( |
34 | | - Xml::openElement( 'script', array( 'type' => $wgJsMimeType, 'src' => |
35 | | - "$wgScriptPath/extensions/CleanChanges/cleanchanges.js?$wgStyleVersion" ) |
36 | | - ) . '</script>' |
37 | | - ); |
| 32 | + global $wgOut; |
| 33 | + $wgOut->addScriptClass( 'CleanChanges' ); |
38 | 34 | } |
39 | 35 | |
40 | 36 | /* If some list was specified, stop processing */ |