-
-
Save xkef/30c8d4ec29ebbc5d02ed03c49bfbdcad to your computer and use it in GitHub Desktop.
xkcd
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> | |
<script> | |
var x = document.createElement("IMG"); | |
fetch("https://xkcd.now.sh/?comic=2254") | |
.then(res => res.json()) | |
.then(({ img }) => { | |
x.setAttribute("src", img); | |
document.body.appendChild(x); | |
}) | |
.catch(e => console.log(e)); | |
</script> | |
<body></body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment