Skip to content

Instantly share code, notes, and snippets.

@woganmay
Last active April 13, 2017 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woganmay/cf7291e081c1f2370f618ced343e8ff8 to your computer and use it in GitHub Desktop.
Save woganmay/cf7291e081c1f2370f618ced343e8ff8 to your computer and use it in GitHub Desktop.
collapse-emoji.js
/*
* 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