diff options
author | Sarven Capadisli <csarven@controlyourself.ca> | 2009-08-08 10:44:28 +0000 |
---|---|---|
committer | Sarven Capadisli <csarven@controlyourself.ca> | 2009-08-08 10:44:28 +0000 |
commit | 534d0d804c6b92d8498fbd37a947e3712aaa9e3e (patch) | |
tree | a09475532f462af33c6957994e63187a838e1ddc | |
parent | 468252ee6a4604ef973a3a8497685ea88afc0531 (diff) |
Fix for removing the first occurance of the duplicate nickname in
textarea when NoticeReply() is used.
-rw-r--r-- | js/util.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/util.js b/js/util.js index 1ab711cd1..0ffa92ca9 100644 --- a/js/util.js +++ b/js/util.js @@ -257,10 +257,10 @@ function NoticeReply() { function NoticeReplySet(nick,id) { rgx_username = /^[0-9a-zA-Z\-_.]*$/; if (nick.match(rgx_username)) { - replyto = "@" + nick + " "; var text = $("#notice_data-text"); if (text.length) { - text.val(replyto + text.val()); + replyto = "@" + nick + " "; + text.val(replyto + text.val().replace(RegExp(replyto, 'i'), '')); $("#form_notice input#notice_in-reply-to").val(id); if (text.get(0).setSelectionRange) { var len = text.val().length; |