diff --git a/files/assets/js/chat.js b/files/assets/js/chat.js index 681e838c24..0309708f1b 100644 --- a/files/assets/js/chat.js +++ b/files/assets/js/chat.js @@ -107,10 +107,12 @@ function send() { } function quote(t) { - text = t.previousElementSibling.innerHTML.replace(/>/g, "> ").replace(/\n/g, "\n> ").replace(/\*/g,"\\*") + text = t.previousElementSibling.innerHTML.replace(/\*/g,"\\*").split('\n').pop() + let username try {username = t.parentElement.previousElementSibling.previousElementSibling.innerHTML} catch(e) {username = t.parentElement.previousElementSibling.innerHTML} + textbox.value = '> ' + text + '\n@' + username + ' ' textbox.focus() autoExpand(textbox); diff --git a/files/templates/chat.html b/files/templates/chat.html index 1097a35117..3917d4514f 100644 --- a/files/templates/chat.html +++ b/files/templates/chat.html @@ -214,6 +214,6 @@ - + \ No newline at end of file