Ctrl+Shift+3 has been going well. I’ve enjoyed building it and meeting people who appreciate the minimal text only flavor. Since it’s text only, emojis have been something I’ve thought about since day one.
Up until now, I left emojis as-is. The reason is I consider emojis to be text. Which they are. They are characters. Unicode. Not images. So, I could have left things alone. But, I also like how emoticons look (o_O). I think they are more creative, expressive, and even more traditional, text-like compared to emojis. So, they fit the text only vibe better.
So, I created some JavaScript to convert emojis to emoticons on page load at Ctrl+Shift+3. It’s lightweight, and open source.
I did miss some popular emojis somehow. But soon I’ll update it and eventually every emoji will be covered. Although, for many emojis what happens is not an emoticon but a text description of that emoji. Because, for example, I don’t want to try and figure out an emoticon version of plants, animals, etc. Not right now.
To use this on your own website, store the .js file somewhere. Then, just before your </body> tag, place:
<script src="path/to/file/emojicon.js" defer></script>
Change the path to point to where you are storing the .js file.
The only issue is that if there are a ton of emojis on a page, or if the page loads slowly, you’ll see the emojis for a moment before the JavaScript converts them.
I think JavaScript was a good approach here because what if I decide to go back to leaving emojis alone at Ctrl+Shift+3 one day? Since this is JavaScript I can. Because it’s actual emojis in the database. If I would have made it so that emojis convert on posting, it wouldn’t be easily reversible. But, this does mean that in the cli or some text only browser, you’ll still see emojis while others see the emoticons. ¯(°_o)/¯