Index: trunk/extensions/ApiSandbox/ext.apiSandbox.js |
— | — | @@ -193,7 +193,13 @@ |
194 | 194 | |
195 | 195 | function createInputs( info ) { |
196 | 196 | currentInfo = info; |
197 | | - $help.html( smartEscape( info.description ) ); |
| 197 | + var desc = smartEscape( info.description ); |
| 198 | + if ( isset( info.helpurls ) && isset( info.helpurls[0] ) && info.helpurls[0] ) { |
| 199 | + desc = desc.replace( /^([^\r\n\.]*)/, |
| 200 | + '<a target="_blank" href="' + mw.html.escape( info.helpurls[0] ) + '">$1</a>' |
| 201 | + ); |
| 202 | + } |
| 203 | + $help.html( desc ); |
198 | 204 | var s = '<table class="api-sandbox-options">\n<tbody>'; |
199 | 205 | for ( var i = 0; i < info.parameters.length; i++ ) { |
200 | 206 | var param = info.parameters[i], |