Last active
April 13, 2017 12:45
-
-
Save woganmay/cf7291e081c1f2370f618ced343e8ff8 to your computer and use it in GitHub Desktop.
collapse-emoji.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Instructions: | |
* Open Mastodon, hit F11 (or whatever brings up your console) | |
* Paste this and hit enter | |
* http://i.imgur.com/LtQ5Zk3.gifv | |
*/ | |
$(function(){ | |
// Fetch the Emojione clientside library | |
$.getScript("https://cdnjs.cloudflare.com/ajax/libs/emojione/2.2.7/lib/js/emojione.min.js"); | |
// Bind emoji detection/substitution to keyup events | |
$("textarea.autosuggest-textarea__textarea").keyup(function(e){ | |
$("textarea.autosuggest-textarea__textarea").val(emojione.shortnameToUnicode($("textarea.autosuggest-textarea__textarea").val())); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment