Skip to content

Instantly share code, notes, and snippets.

@linusthe3rd
Forked from saranyan/embedgist.js
Last active February 13, 2016 18:09
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save linusthe3rd/8967034 to your computer and use it in GitHub Desktop.
Save linusthe3rd/8967034 to your computer and use it in GitHub Desktop.
$(document).ready(function() {
var embedGist = function () {
$('a[href^="https://gist.github.com"]').each(function(i) {
if (writeCapture) {
var wrapper = $("<div></div>");
wrapper.insertAfter(this);
writeCapture.html(wrapper[0], '<script src="'+$(this).attr("href")+'.js"></script>');
$(this).remove();
} else {
window.setTimeout(waitForFnc,50);
}
});
}
embedGist();
});
<!-- Add the following lines to theme's html code right before </body> -->
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script>
<script src="http://static.tumblr.com/zx0ox2p/Jr9n13uql/embedgist2.js"></script>
<!--
Usage: just add a link to your gist
Example: <a href="https://gist.github.com/1395926">https://gist.github.com/1395926</div>
-->
@brunojppb
Copy link

I do not know what happened, but it stopped working in my Tumblr. Do you know what did happen? Thanks.

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