Created
October 5, 2009 02:27
-
-
Save imlucas/201797 to your computer and use it in GitHub Desktop.
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
if($('link[href=http://gist.github.com/stylesheets/gist/embed.css]').length==0){ | |
$('head').append('<link rel="stylesheet" type="text/css" media="screen" href="http://gist.github.com/stylesheets/gist/embed.css" />'); | |
} | |
var g = 'http://gist.github.com/'; | |
$('.content a[href^='+g+']').each(function(){ | |
var el = $(this); | |
var gist_json_url = el.attr('href')+'.json'; | |
$.getJSON('http://pipes.yahoo.com/pipes/pipe.run?_callback=?&_render=json&_id=f6840497e732806602852e40bc38cacc&gist_url='+encodeURIComponent(gist_json_url), function(d){ | |
var gist = d.value.items[0].gist; | |
$(gist).insertAfter(el); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment