-
-
Save linusthe3rd/8967034 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
$(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(); | |
}); |
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
<!-- 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> | |
--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I do not know what happened, but it stopped working in my Tumblr. Do you know what did happen? Thanks.