Created
November 28, 2011 12:57
-
-
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
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 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