mirror of
https://github.com/Spengreb/sync.git
synced 2026-05-14 19:42:06 +00:00
Fix emote insertion behavior
This commit is contained in:
parent
389dd0d5ab
commit
691ec3055c
1 changed files with 4 additions and 1 deletions
|
|
@ -2915,9 +2915,12 @@ EmoteList.prototype.loadPage = function (page) {
|
||||||
img.title = emote.name;
|
img.title = emote.name;
|
||||||
img.onclick = function () {
|
img.onclick = function () {
|
||||||
var val = chatline.value;
|
var val = chatline.value;
|
||||||
if (!val || val.charAt(val.length - 1).match(/\s/)) {
|
if (!val) {
|
||||||
chatline.value = emote.name;
|
chatline.value = emote.name;
|
||||||
} else {
|
} else {
|
||||||
|
if (!val.charAt(val.length - 1).match(/\s/)) {
|
||||||
|
chatline.value += " ";
|
||||||
|
}
|
||||||
chatline.value += " " + emote.name;
|
chatline.value += " " + emote.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue