|
@@ -100,13 +100,11 @@ function Quote(post, user, link = false) {
|
100
|
100
|
target += post;
|
101
|
101
|
}
|
102
|
102
|
ajax.get(requrl, function(response) {
|
103
|
|
- if ($('#quickpost').raw().value !== '') {
|
104
|
|
- $('#quickpost').raw().value = $('#quickpost').raw().value + "\n\n";
|
|
103
|
+ let postarea = ($('textarea').raw().name=='body') ? $('textarea').raw() : $('#quickpost').raw();
|
|
104
|
+ if (postarea.value !== '') {
|
|
105
|
+ postarea.value += "\n\n";
|
105
|
106
|
}
|
106
|
|
- $('#quickpost').raw().value = $('#quickpost').raw().value + "[quote=" + username + (link == true ? "|" + target : "") + "]" +
|
107
|
|
- //response.replace(/(img|aud)(\]|=)/ig,'url$2').replace(/\[url\=(https?:\/\/[^\s\[\]<>"\'()]+?)\]\[url\](.+?)\[\/url\]\[\/url\]/gi, "[url]$1[/url]")
|
108
|
|
- html_entity_decode(response)
|
109
|
|
- + "[/quote]";
|
|
107
|
+ postarea.value += "[quote=" + username + (link == true ? "|" + target : "") + "]" + html_entity_decode(response) + "[/quote]";
|
110
|
108
|
resize('quickpost');
|
111
|
109
|
});
|
112
|
110
|
}
|