Index: trunk/extensions/WikiLove/wikiLove.js |
— | — | @@ -10,14 +10,14 @@ |
11 | 11 | 'original': { |
12 | 12 | title: 'An Original Barnstar for you!', // subject title for the message |
13 | 13 | descr: 'Original barnstar', // description in the menu |
14 | | - text: '{{subst:The Original Barnstar|$1 ~~~~}}', // message text, $1 is replaced by the user message |
| 14 | + text: '{{subst:The Original Barnstar|$1}}', // message text, $1 is replaced by the user message |
15 | 15 | template: 'The Original Barnstar', // template that is used, for statistics |
16 | 16 | message: 'Hello '+wgTitle+'!\n\nI just awarded you a barnstar.' // message to use in email notification |
17 | 17 | }, |
18 | 18 | 'special': { |
19 | 19 | title: null, // no predefined title, allows the user to enter a title |
20 | 20 | descr: 'Special barnstar', |
21 | | - text: '{{subst:The Special Barnstarl|$1 ~~~~}}', |
| 21 | + text: '{{subst:The Special Barnstarl|$1}}', |
22 | 22 | template: 'The Special Barnstar', |
23 | 23 | message: 'Hello '+wgTitle+'!\n\nI just awarded you the special barnstar.' |
24 | 24 | } |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | 'makeyourown': { |
31 | 31 | title: null, |
32 | 32 | descr: mw.msg( 'wikilove-type-makeyourown' ), |
33 | | - text: "$1\n\n~~~~", |
| 33 | + text: "$1", |
34 | 34 | template: '' |
35 | 35 | } |
36 | 36 | }, |
— | — | @@ -287,7 +287,11 @@ |
288 | 288 | submitPreview: function( e ) { |
289 | 289 | e.preventDefault(); |
290 | 290 | var title = '==' + $( '#wlTitle' ).val() + "==\n"; |
291 | | - var msg = $.wikiLove.currentTypeOrSubtype.text.replace( '$1', $( '#wlMessage' ).val() ); |
| 291 | + var rawMessage = $( '#wlMessage' ).val(); |
| 292 | + if ( rawMessage.indexOf( '~~~' ) == -1 ) { |
| 293 | + rawMessage += ' ~~~~'; |
| 294 | + } |
| 295 | + var msg = $.wikiLove.currentTypeOrSubtype.text.replace( '$1', rawMessage ); |
292 | 296 | $.wikiLove.doPreview( title + msg ); |
293 | 297 | $.wikiLove.previewData = { |
294 | 298 | 'title': title, |