Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -122,20 +122,13 @@ |
123 | 123 | * @param string $file filename in skins/common or complete on-server path (/foo/bar.js) |
124 | 124 | */ |
125 | 125 | function addScriptFile( $file ) { |
126 | | - global $wgStylePath, $wgStyleVersion, $wgJsMimeType; |
| 126 | + global $wgStylePath, $wgStyleVersion; |
127 | 127 | if( substr( $file, 0, 1 ) == '/' ) { |
128 | 128 | $path = $file; |
129 | 129 | } else { |
130 | 130 | $path = "{$wgStylePath}/common/{$file}"; |
131 | 131 | } |
132 | | - $this->addScript( |
133 | | - Html::element( 'script', |
134 | | - array( |
135 | | - 'type' => $wgJsMimeType, |
136 | | - 'src' => "$path?$wgStyleVersion", |
137 | | - ) |
138 | | - ) |
139 | | - ); |
| 132 | + $this->addScript( Html::linkedScript( "$path?$wgStyleVersion" ) ); |
140 | 133 | } |
141 | 134 | |
142 | 135 | /** |