Merge pull request #406 from Gargron/revert-404-emoji
Revert "Display native emoji on browsers which support it"master
commit
3354dc117b
@ -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); |
||||
} |
||||
}; |
||||
|
Loading…
Reference in new issue