Revert "Display native emoji on browsers which support it"

This commit is contained in:
Eugen
2017-01-05 13:45:21 +01:00
committed by GitHub
parent 87f76d4095
commit 9e6ceb3201
3 changed files with 3 additions and 17 deletions

View File

@ -1,18 +1,9 @@
import emojione from 'emojione';
import detectVersion from 'mojibaka';
emojione.imageType = 'png';
emojione.sprites = false;
emojione.imagePathPNG = '/emoji/';
let emoji_version = detectVersion();
export default function emojify(text) {
// Browser too old to support native emoji
if (emoji_version < 9.0) {
return emojione.toImage(text);
// Convert short codes into native emoji
} else {
return emojione.shortnameToUnicode(text);
}
return emojione.toImage(text);
};