diff --git a/static/js/emoji_picker.js b/static/js/emoji_picker.js index 197c597358..f5f8220cbb 100644 --- a/static/js/emoji_picker.js +++ b/static/js/emoji_picker.js @@ -72,6 +72,16 @@ function get_emoji_id(section, index) { return emoji_id; } +function get_emoji_coordinates(emoji_id) { + // Emoji id is of the following form: __ + // itself contains two underscores. See `get_emoji_id()`. + var emoji_info = emoji_id.split("_"); + return { + section: parseInt(emoji_info[3], 10), + index: parseInt(emoji_info[4], 10), + }; +} + function show_search_results() { $(".emoji-popover-emoji-map").hide(); $(".emoji-popover-category-tabs").hide();