When replying, use @username only
This commit is contained in:
@@ -21,8 +21,8 @@ $(document).on('click','body .comment-action-reply',function(e){
|
|||||||
commentField.setAttribute('data-parent_id', parentNodeId);
|
commentField.setAttribute('data-parent_id', parentNodeId);
|
||||||
|
|
||||||
// Start the comment field with @authorname:
|
// Start the comment field with @authorname:
|
||||||
var replyAuthor = $(this).parent().parent().find('.comment-author:first').html();
|
var replyAuthor = $(this).parent().parent().find('.comment-author:first span').html();
|
||||||
$(commentField).val("**@" + replyAuthor + ":** ");
|
$(commentField).val("**@" + replyAuthor.slice(1, -1) + ":** ");
|
||||||
|
|
||||||
// Add class for styling
|
// Add class for styling
|
||||||
$('.comment-container').removeClass('is-replying');
|
$('.comment-container').removeClass('is-replying');
|
||||||
|
Reference in New Issue
Block a user