mirror of https://github.com/calzoneman/sync.git
Fix emote insertion behavior
This commit is contained in:
parent
389dd0d5ab
commit
691ec3055c
|
@ -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…
Reference in New Issue