Last active
August 29, 2015 14:05
-
-
Save dhoko/c810679812d0585ef08c to your computer and use it in GitHub Desktop.
Github Emoji emoticons
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
javascript:(function(){function doRequest(url,cb){cb=cb||function(){};var xhr=new XMLHttpRequest;var requestUrl=url;xhr.open("GET",requestUrl,true);xhr.onreadystatechange=function(){var status;var data;if(xhr.readyState==4){status=xhr.status;if(status==200){cb(JSON.parse(xhr.responseText))}}};xhr.send()}var body=["<style>ul {margin:0; padding:0; text-align:center} li { display: inline-block; vertical-align: top; list-style: none; background: #eee; margin: 2em; border: 1px solid rgb(217, 217, 217); width: 15%;}</style><ul><!--"];var figure='--><li><figure><img src="%img%" alt=""><figcaption><b>:%txt%:</b></figcaption></figure></li><!--';doRequest("https://api.github.com/emojis",function(data){for(var key in data){body.push(figure.replace("%txt%",key).replace("%img%",data[key]))}body.push("--></ul>");document.body.innerHTML=body.join("")});})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Source https://gist.github.com/dhoko/7a4452159231674c1cdd