Skip to content

Instantly share code, notes, and snippets.

@nakajima
Created October 27, 2013 00:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nakajima/7176362 to your computer and use it in GitHub Desktop.
Save nakajima/7176362 to your computer and use it in GitHub Desktop.
[~/.js] cat github.com.js
// Hashtagify emoji
$(function() {
$('img.emoji').each(function() {
var name = $(this).attr("title").replace(/:/g, '')
if (name == '+1') { name = "thumbsup" }
if (name == '-1') { name = "thumbsdown" }
hashtag = $("<span>#" + name + "</span>");
hashtag.css({ color: '#000', fontWeight: 'bold' });
$(this).replaceWith(hashtag)
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment