Skip to content

Instantly share code, notes, and snippets.

@jwpage
Created September 15, 2010 22:50
Show Gist options
  • Save jwpage/581644 to your computer and use it in GitHub Desktop.
Save jwpage/581644 to your computer and use it in GitHub Desktop.
// Bookmarklet to remove @mentions from a page on Twitter (probably not #newtwitter).
// Useful for when you're checking out someone's profile and want to see what they tweet,
// and not what they reply to.
javascript:var s = document.getElementsByClassName("status");var removes = [];for(var i=0; i<s.length; i++) { var n = s[i]; var txt = n.getElementsByClassName("entry-content")[0].innerHTML; if(txt.replace(/^\s*/, "").charAt(0) == "@") { removes.push(n.getAttribute("id")); }}for(var i=0; i<removes.length; i++) { var el = document.getElementById(removes[i]); el.parentNode.removeChild(el);}void(0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment