Hotfix for profiles

This commit is contained in:
Niklas Poslovski 2019-02-08 12:23:50 +00:00
parent 8619a1acbe
commit efd0d72140
1 changed files with 10 additions and 0 deletions

View File

@ -1504,6 +1504,16 @@ twemoji.parse(this,{base:"https://"+current_instance,ext:".svg",folder:"/emoji"}
$(this).removeClass('emoji_poss');
});
}
function replaced_emoji_return(original) {
const emojis = original.match(/(:[a-zA-Z\d+_-]+?:)/g);
for(let i in emojis) {
var emoji = emojis[i].replace(/-/g,"_");
if(emoji_dict[emoji.substr(1,emoji.length-2)]) {
original = original.replace(emojis[i],emoji_dict[emoji.substr(1,emoji.length-2)]);
}
}
return original;
}
function replace_emoji_textarea(element) {
var txt = $(element);
var cursorPos = txt.prop('selectionStart');