Skip to content

Instantly share code, notes, and snippets.

@ngryman
Forked from vitorbal/gistembed.js
Created March 17, 2013 04:43
Show Gist options
  • Save ngryman/5180155 to your computer and use it in GitHub Desktop.
Save ngryman/5180155 to your computer and use it in GitHub Desktop.
$(document).ready(function() {
var prefix = "https://gist.github.com/";
$('a[href^="' + prefix + '"]').each(function(i) {
var $anchor = $(this),
$el = $("<p></p>");
$anchor.replaceWith($el);
writeCapture.html($el, '<script src="'+$anchor.text()+'"></scr' + 'ipt>');
$anchor.remove();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment