Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 21st, 2013  |  syntax: None  |  size: 0.85 KB  |  hits: 57  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. // ==UserScript==
  2. // @name        Techdirt Comment Filter
  3. // @namespace   http://google.com
  4. // @description Forces threading, hides stupid comments and the idiots who reply
  5. // @author      Sergey Brin
  6. // @include     http://www.techdirt.com/*
  7. // @include     https://www.techdirt.com/*
  8. // @version     1.0
  9. // @grant       none
  10. // ==/UserScript==
  11.  
  12. var loc = window.location.href;
  13. var param = "threaded=true";
  14. if (!(loc.match(param))) {
  15.         var locsuffix=(loc.match(/\?/))?"&threaded=true":"?threaded=true";
  16.         window.location.replace(loc + locsuffix);
  17. }
  18. var cmt = document.body.querySelectorAll("li.cmt");
  19. for(var i=0;i<cmt.length;i++)if(cmt[i].innerHTML.match(/out_of_the_blue|mikey|milk/gim)){
  20.     var tr = cmt[i];
  21.     tr.style.display="none";
  22.  
  23.     if(tr.nextElementSibling.nodeName == "UL"){
  24.         tr.nextElementSibling.style.display="none";
  25.     }
  26. }