View difference between Paste ID: A6EWJScM and 6Cm1gJVq
SHOW: | | - or go back to the newest paste.
1
// ==UserScript==
2-
// @name           Techdirt Comment Filter
2+
// @name        Techdirt Comment Filter
3-
// @namespace      https://google.com
3+
// @namespace   http://google.com
4-
// @author         Sergey Brin
4+
// @description Hides out_of_the_blue comments on Techdirt
5-
// @version        1.0
5+
// @author      Sergey Brin
6-
// @description    Hides out_of_the_blue Comments on Techdirt
6+
// @include     http://www.techdirt.com/*
7-
// @include       http://www.techdirt.com/*
7+
// @include     https://www.techdirt.com/*
8-
// @include       https://www.techdirt.com/*
8+
// @version     1.0
9
// @grant       none
10-
javascript:(function() {var as=document.body.querySelectorAll("li.cmt");for(var i=0;i<as.length;i++)if(as[i].innerHTML.match(/out_of_the_blue/gim)){var tr=as[i];tr.style.display="none";}})()
10+
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
}