Advertisement
Kielistic

Fix Slashdot Trolls

Mar 26th, 2013
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name            Fix Slashdot Trolls
  3. // @description     Fixes what the devs won't
  4. // @author          Kielistic
  5. // @include         http://*.slashdot.org/*
  6. // @require         http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js
  7. // @grant none.
  8. // ==/UserScript==
  9.     $(document).ready(function()
  10.     {
  11.         $("li.comment").each(function()
  12.         {
  13.             if ($(this).children(".cw").find("div.commentBody p").length > 10)
  14.             {
  15.                 var text = $(this).children(".cw").find("div.commentBody").text();
  16.                 if (text.indexOf("CUSTOM HOSTS FILES") >= 0
  17.                     || text.indexOf("'Acceptable Ads'")>=0
  18.                     || text.indexOf("Alexander Peter Kowalski") >= 0)
  19.                 {
  20.                     $(this).children(".cw").find("div.commentBody").html("I'm an ineffective troll.");
  21.                 }
  22.             }
  23.         });
  24.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement