Skip to content

Instantly share code, notes, and snippets.

@dergachev
Created November 22, 2012 06:15
Show Gist options
  • Save dergachev/4129655 to your computer and use it in GitHub Desktop.
Save dergachev/4129655 to your computer and use it in GitHub Desktop.
Gist Embed JS hackery
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
"></script>
<script src="script.js"></script>
<h2><a href="/blog/550-multiple-file-gist-improvements">Multiple file gist improvements</a></h2>
<div class="entry-content markdown-body">
<p>We've always had the ability to embed multiple file gists:</p>
<script src="https://gist.github.com/238498.js"></script><p>But today we added the ability to embed specific files in a multi-file gist!</p>
<script src="https://gist.github.com/238498.js?file=second_file.js"></script><p>We also added permalinks next to each file name so you can hard link to specific files <a href="https://gist.github.com/238498#file_second_file.js">like so</a></p>
<p></p><center><img src="https://a248.e.akamai.net/camo.github.com/c73f7230fdecc7ca22519b0440feb08ab792740b/687474703a2f2f73686172652e6b796c656e656174682e636f6d2f63617074757265732f676973745f5f3233383439385f2d5f4769744875622d32303039313131382d3138343631352e6a7067"></center>
</div>
$('.gist-file').hide()
.find('.gist-meta>a[href*="https://gist.github.com/238498#file_second_file.js"]')
.parents('.gist-file')
.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment