Skip to content

Instantly share code, notes, and snippets.

@meza
Last active December 21, 2015 07:19
Show Gist options
  • Save meza/6270512 to your computer and use it in GitHub Desktop.
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
<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>
@meza
Copy link
Author

meza commented Aug 19, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment