From cb91ccc04623dd29ec378389cd4cf02daac06cbc Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 11 Aug 2022 19:10:54 +0200 Subject: [PATCH] fix this https://rdrama.org/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/2329888?context=8#context --- files/assets/js/emoji_modal.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/files/assets/js/emoji_modal.js b/files/assets/js/emoji_modal.js index ae4aa5bd2..df0fde14a 100644 --- a/files/assets/js/emoji_modal.js +++ b/files/assets/js/emoji_modal.js @@ -444,6 +444,9 @@ function emojiAddToInput(event) emoji_option_text.title = result; emoji_option_text.innerText = result; + if (current_word.includes("#")) result = `#${result}` + if (current_word.includes("!")) result = `!${result}` + emoji_option.onclick = (e) => { speed_carot_modal.style.display = "none"; textbox.value = textbox.value.replace(new RegExp(current_word+"(?=\\s|$)", "g"), `:${result}:`) @@ -497,7 +500,7 @@ function emojiAddToInput(event) speed_carot_modal.style.top = modal_pos.y + box_coords.y + 14 + "px"; // Do the search (and do something with it) - populate_speed_emoji_modal(emojisSearchDictionary.searchFor(current_word.substr(1)), event.target); + populate_speed_emoji_modal(emojisSearchDictionary.searchFor(current_word.substr(1).replace(/#/g, "").replace(/!/g, "")), event.target); } else {