Advertisement
Guest User

Untitled

a guest
Jun 7th, 2013
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name Techdirt Comment Filter
  3. // @namespace http://google.com
  4. // @description Hides out_of_the_blue comments on Techdirt
  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. var myloc = window.location.href;
  12. var myparam = "threaded=true";
  13. if (!(myloc.match(myparam))) {
  14. var mylocSuffix=(myloc.match(/\?/))?"&threaded=true":"?threaded=true";
  15. window.location.replace(myloc + mylocSuffix);
  16. }
  17. var as = document.body.querySelectorAll("li.cmt");
  18. for(var i=0;i<as.length;i++)if(as[i].innerHTML.match(/out_of_the_blue/gim)){
  19. var tr = as[i];tr.style.display="none";
  20. tr.nextElementSibling.style.display="none";
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement