Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Created January 15, 2015 19:59
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/3235db049b18699c082b to your computer and use it in GitHub Desktop.
Save anonymous/3235db049b18699c082b to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name No Bennett
// @description Remove troll posts from Slashdot front page.
// @include http://slashdot.org/*
// @include http://*.slashdot.org/*
// @include https://slashdot.org/*
// @include https://*.slashdot.org/*
// @exclude https://*.slashdot.org/story/*
// @exclude http://*.slashdot.org/story/*
// @grant none
// ==/UserScript==
var elements = document.getElementsByTagName('article');
for(var i = 0; i < elements.length; i++) {
var text = elements[i].textContent;
if(text.search("Bennett Haselton") != -1) {
elements[i].parentNode.removeChild(elements[i]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment