Created
January 27, 2016 19:30
-
-
Save EtherTyper/ca736d4cef07712134e7 to your computer and use it in GitHub Desktop.
Early version of my new GitHub v3 App, Emoji, @ <https://ethertyper.github.io/emoji/>
This file contains 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
<html> | |
<head> | |
<title> | |
ALL THE EMOJIS! | |
</title> | |
</head> | |
<body> | |
<div id="emoji"> | |
<button onclick="emoji()"> | |
Click me | |
</button> | |
</div> | |
<script> | |
var emojiURLs; | |
var emojiPics=""; | |
var oReq = new XMLHttpRequest(); | |
oReq.onload = reqListener; | |
oReq.open("get", "https://api.github.com/emojis", true); | |
oReq.send(); | |
function reqListener(e) { | |
emojiURLs = JSON.parse(this.responseText); | |
} | |
function emoji(){ | |
emojiPics+="<h1 style='text-align: center; width: screen.width'><strong><em>ALL THE EMOJI</em></strong></h1>"; | |
for (var emoji in emojiURLs){ | |
emojiPics=emojiPics+"<img src='"+emojiURLs[emoji]+"' alt=':"+emoji+":' title=':"+emoji+":' height='30' width='30'>"; | |
} | |
document.getElementById("emoji").innerHTML=emojiPics; | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment