File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 29
29
var $author = $comment . find ( '.topic-meta-data .names .username' ) . first ( ) ;
30
30
var $replyTextarea = $ ( '#reply-control textarea[name="comment-content"]' ) ;
31
31
var value = null ;
32
+ var reUrl = null ;
32
33
33
34
$ ( '#reply-control' ) . collapse ( 'show' ) ;
34
35
35
36
document . location . hash = $comment . attr ( 'id' ) ;
36
37
38
+ reUrl = document . location . pathname + document . location . hash ;
39
+ reUrl = reUrl . replace ( / \( / g, '%28' ) . replace ( / \) / g, '%29' ) ;
40
+
37
41
value = $replyTextarea . val ( ) ;
38
42
if ( ! / ^ \s * $ / . test ( value ) ) {
39
43
// Add linebreaks if reply already started.
40
44
value += '\n\n' ;
41
45
}
42
- value += '[Re](' + document . location . href . replace ( / \( / g , '%28' ) . replace ( / \) / g , '%29' ) + '): ' ;
46
+ value += '[Re](' + reUrl + '): ' ;
43
47
value += '@' + $author . text ( ) + ': ' ;
44
48
value += ' \n' ;
45
49
$replyTextarea . val ( value ) ;
You can’t perform that action at this time.
0 commit comments