Skip to content

Instantly share code, notes, and snippets.

@atommarvel
Created November 13, 2013 19:04
Show Gist options
  • Save atommarvel/7454481 to your computer and use it in GitHub Desktop.
Save atommarvel/7454481 to your computer and use it in GitHub Desktop.
Remove any post that contains the strings in strings2block. Initially it contains buzz, feed, and buzzfeed.
var posts = document.getElementsByClassName("userContent");
var strings2block = ["buzz","feed","buzzfeed"]
var doesPostContainBlock = function(postContent, blockContent){
for (y in blockContent){
if(postContent.search(blockContent[y])>0)
return true;
}
return false;
}
for (x in posts){
result = 0;
content = posts[x].innerHTML;
if(doesPostContainBlock(content,strings2block))
posts[x].innerHTML = "";
}
@atommarvel
Copy link
Author

Instructions

  • Press ctrl+shift+i
  • click the "console" tab
  • paste the code from here
  • press enter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment