Skip to content

Instantly share code, notes, and snippets.

@choonkeat
Created October 30, 2009 17:14
Show Gist options
  • Save choonkeat/222540 to your computer and use it in GitHub Desktop.
Save choonkeat/222540 to your computer and use it in GitHub Desktop.
bookmarklet to show memberships on twitter profile
/*
bookmark: javascript:void(function(){var%20urls=['http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js','http://gist.github.com/raw/222540/52236ed6fd9f706c7c1f8c654427b53861f21945/twitter-member-lists.js'];for(n%20in%20urls){var%20s=document.createElement('script');s.src=urls[n];document.getElementsByTagName('head')[0].appendChild(s);}}())
*/
jQuery.getJSON(window.location + "/lists/memberships.json?callback=?", function(json) {
var list_names = jQuery.map(json.lists, function(obj) { return obj.name; });
jQuery('h2.thumb').after("<code>" + list_names.join(", ") + "</code>");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment