Skip to content

Instantly share code, notes, and snippets.

@gregorkas
Last active December 21, 2015 06:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gregorkas/6267453 to your computer and use it in GitHub Desktop.
Save gregorkas/6267453 to your computer and use it in GitHub Desktop.
A bookmarklet for removing posts from Hacker News that contain the words: "in Go".
javascript:var as=document.getElementsByTagName("a");for(var idx in as){var ihtml=as[idx].innerHTML;if(ihtml&&ihtml.indexOf("in Go")!=-1){var parent=as[idx].parentNode.parentNode.parentNode;var toRemove=as[idx].parentNode.parentNode;var sibling=as[idx].parentNode.parentNode.nextSibling;parent.removeChild(toRemove);parent.removeChild(sibling)}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment