JavaScript Emotify: Making the web a better place, one tiny image at a time...

JavaScript Emotify helps make the web a better place, one tiny image at a time… (the original title was “this is what it sounds like when HTML cries” but Prince’s lawyers sent me a C&D citing, get this, “bad taste”). Seriously though, this code turns text into “emotified” HTML. You know, like, with smileys.

To make a long story short…

This code was originally written as a way to “pretty-up” the chat text in Simplified, my Linkinus message theme. And like much of my code, it seemed like a good idea to make it as generalized as possible, so that others could benefit from my “hard work” (also known as “lack of something better to do with my spare time”).

And the result?

This sad, old, uninteresting text:

Becomes this amazing, exciting HTML!

I won’t bore you with any code samples on this page, because it’s really “just that simple” (and there are plenty of code samples in the examples and documentation).

Check out either the basic emotification example, where emoticons are defined in a simple, standard way.. or the much more intense, thrilling Adium Emoticonsets example, where emoticons from the popular open-source chat client are loaded dynamically.. and the world simply becomes a better place in which to live.

Use &lt; instead of < and &gt; instead of > in the examples themselves.

JavaScript Emotify: Making the web a better place, one tiny image at a time...

JavaScript Emotify helps make the web a better place, one tiny image at a time... (the original title was \"this is what it sounds like when HTML cries\" but Prince's lawyers sent me a C&D citing, get this, \"bad taste\"). Seriously though, this code turns text into \"emotified\" HTML. You know, like, with smileys.