Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Only toggle pod if there are lines of other code
don't start source view with a blank page for .pod files.
  • Loading branch information
rwstauner committed Oct 11, 2011
1 parent 4e8d7e8 commit 0b90e09
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions root/source.html
Expand Up @@ -14,7 +14,9 @@
<li>&nbsp;</li>
<li><a href="<% api %>/source/<% module.author %>/<% module.release %>/<% module.path %>">Raw code</a></li>
<li><a href="/raw/<% module.author %>/<% module.release %>/<% module.path %>?download=1">Download</a></li>
<% IF module.sloc > 0 %>
<li><a href="javascript:togglePod(<% module.pod_lines.json %>)">Toggle pod</a></li>
<% END %>
</ul>
<hr>
<strong>Info</strong>
Expand All @@ -34,7 +36,9 @@
//document.getElementById('source').style.visibility = 'hidden';
//SyntaxHighlighter.all();
$(document).ready(function() {
<% IF module.sloc > 0 %>
togglePod(<% module.pod_lines.json %>);
<% END %>
if(document.location.hash)
document.location.href = document.location.href;
});
Expand Down

0 comments on commit 0b90e09

Please sign in to comment.