File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929 var $author = $comment . find ( '.topic-meta-data .names .username' ) . first ( ) ;
3030 var $replyTextarea = $ ( '#reply-control textarea[name="comment-content"]' ) ;
3131 var value = null ;
32+ var reUrl = null ;
3233
3334 $ ( '#reply-control' ) . collapse ( 'show' ) ;
3435
3536 document . location . hash = $comment . attr ( 'id' ) ;
3637
38+ reUrl = document . location . pathname + document . location . hash ;
39+ reUrl = reUrl . replace ( / \( / g, '%28' ) . replace ( / \) / g, '%29' ) ;
40+
3741 value = $replyTextarea . val ( ) ;
3842 if ( ! / ^ \s * $ / . test ( value ) ) {
3943 // Add linebreaks if reply already started.
4044 value += '\n\n' ;
4145 }
42- value += '[Re](' + document . location . href . replace ( / \( / g , '%28' ) . replace ( / \) / g , '%29' ) + '): ' ;
46+ value += '[Re](' + reUrl + '): ' ;
4347 value += '@' + $author . text ( ) + ': ' ;
4448 value += ' \n' ;
4549 $replyTextarea . val ( value ) ;
You can’t perform that action at this time.
0 commit comments