Convert Text Into Emotes – Emotify

Category: Javascript , Text | June 5, 2022
Author:aryanbaburajan
Views Total:204 views
Official Page:Go to website
Last Update:June 5, 2022
License:MIT

Preview:

Convert Text Into Emotes – Emotify

Description:

The emoticon, or smiley, has become a universal method of communication. That’s why Emotify was created to help you create your own custom emotes.

Emotify is a simple JavaScript library that converts text (wrapped in colons) into custom emotes in an easy & fast way.  It currently comes with 20+ built-in emotes and you can easily add your own.

See Also:

How to use it:

1. Load the Emotify.js library in the document.

<script src="src/emotify.js"></script>

2. Intialize the emote converter.

emotify.convert();

3. Convert text into emotes. All available emotes:

  • sigh
  • sweat
  • neutral
  • love
  • sleepy
  • laugh
  • smile
  • sob
  • confused
  • sad
  • sneeze
  • angry
  • yawn
  • kiss
  • sweat_smile
  • amazed
  • wink
  • smirk
  • unamused
  • joy
  • grin
<span class="em">sigh :sigh:</span>
<span class="em">sweat :sweat:</span>
<span class="em">neutral :neutral:</span>
<span class="em">love :love:</span>
<span class="em">sleepy :sleepy:</span>
<span class="em">laugh :laugh:</span>
<span class="em">smile :smile:</span>
<span class="em">sob :sob:</span>
<span class="em">confused :confused:</span>
<span class="em">sad :sad:</span>
<span class="em">sneeze :sneeze:</span>
<span class="em">angry :angry:</span>
<span class="em">yawn :yawn:</span>
<span class="em">kiss :kiss:</span>
<span class="em">sweat_smile :sweat_smile:</span>
<span class="em">amazed :amazed:</span>
<span class="em">wink :wink:</span>
<span class="em">smirk :smirk:</span>
<span class="em">unamused :unamused:</span>
<span class="em">joy :joy:</span>
<span class="em">grin :grin:</span>

4. Add a custom emote.

emotify.addEmote({ 
  "custom": "/path/to/emote.gif" 
});
<span class="em">custom :custom:</span>

Changelog:

06/05/2022

  • code optimized

You Might Be Interested In:


Leave a Reply