Created
August 15, 2012 12:16
-
-
Save aereal/3359647 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
<script type="text/javascript"> | |
$('.hatena-module-category').find('a').each(function(){ | |
var $self = $(this); | |
var text = $.trim($self.text()); | |
var count = text.match(/\((\d+)\)$/)[1]; | |
$self.attr('data-count', parseInt(count)); | |
$self.text(''); | |
var name = text.split(/\s+/)[0]; | |
$('<img/>').attr('src', 'http://' + name + '.jpg.to').appendTo($self); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment