Skip to content

Instantly share code, notes, and snippets.

@satomacoto
Created November 28, 2011 12:57
Show Gist options
  • Save satomacoto/1400302 to your computer and use it in GitHub Desktop.
Save satomacoto/1400302 to your computer and use it in GitHub Desktop.
A Blogger HTML/JavaScript gadget to add line number to gists, requires jQuery
<!-- add line number to gist -->
<script type="text/javascript">
$('.gist').each(function() {
$('.line',this).each(function(i, e) {
$(this).prepend(
$('<div/>').attr('unselectable','on').css({
'float' : 'left',
'width': '30px',
'font-weight' : 'bold',
'color': 'grey',
'-moz-user-select': 'none',
'-webkit-user-select': 'none'
}).text(++i)
);
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment