Skip to content

Instantly share code, notes, and snippets.

@tryvin
Created November 1, 2015 14:52
Show Gist options
  • Select an option

  • Save tryvin/74c72bdae96f21e844a0 to your computer and use it in GitHub Desktop.

Select an option

Save tryvin/74c72bdae96f21e844a0 to your computer and use it in GitHub Desktop.

Revisions

  1. tryvin created this gist Nov 1, 2015.
    16 changes: 16 additions & 0 deletions tumbler-gist-insert.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    <script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script>
    <script type="text/javascript">
    $(function() {
    $("a[href]").each(
    function(index, element) {
    if ( $(element).attr('href').indexOf('gist.github.com') > 0 ) {
    var divElement = $('<div></div>');
    $(element).after(divElement);

    writeCapture.html(divElement, '<script src="'+$(element).attr('href')+'.js"></'+'script>');
    $(element).remove();
    }
    }
    );
    });
    </script>