Last active
December 21, 2015 07:19
-
-
Save meza/6270512 to your computer and use it in GitHub Desktop.
Grab any gist by adding .json to the url, and paste it into the textarea
https://gist.github.com/meza/89ac3adecec2ffbc5046.json
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
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<textarea id="code" rows=15 cols=45></textarea> | |
<script> | |
jQuery("#code").change(function() { | |
var data = $.parseJSON($("#code").val()); | |
var html = data.div; | |
var css = "<link rel=\"stylesheet\" href=\"http://www.github.com"+data.stylesheet+"\"/>"; | |
$("#code").val(css+"\n"+html); | |
}) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Grab any gist by adding .json to the url, and paste it into the textarea (and click anywhere no the page. but the textarea)
https://gist.github.com/meza/89ac3adecec2ffbc5046.json
Yeah, I could add a button. Feel free to fork :D