Skip to content

Instantly share code, notes, and snippets.

@sidwarkd
Created August 22, 2013 04:56
Show Gist options
  • Save sidwarkd/6303353 to your computer and use it in GitHub Desktop.
Save sidwarkd/6303353 to your computer and use it in GitHub Desktop.
Bookmarklet To Extend Tweet Menu
$("ul.tweet-actions").each(function(index){
$(this).prepend('<li><a role="button" class="my-custom-link" class="js-tooltip" href="#"><b>My Option</b></a></li>');
});
$(".my-custom-link").click(function(evt){
evt.preventDefault();
var el = $(evt.target) || $(evt.srcElement);
var tweetText = el.closest(".content").find("p.tweet-text").first().text();
alert("This is the text from the tweet that you can use for something:\n\n" + tweetText);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment