/*
* @title 質問一覧からスパム投稿を削除(その場しのぎ)
* @description その場しのぎだけど、うっとおしすぎるので
* @include http://*
* @license MIT License
* @require
* @javascript_url
*/
(function(){
if (/http:\/\/q\.hatena\.ne\.jp\/(touch\/)?list/.test(location.href)) {
var RE_SPAM = /^[- a-zA-Z0-9\\\[\](){}<>:;"'`?=/_.,@!~\n]+…?$/;
var selector;
if (/\/touch\//.test(location.href)) {
selector = "LI.list-question SPAN.question-content";
} else {
selector = "UL.list-question LI SPAN.question-content";
}
$(selector).each(function() {
if (RE_SPAM.test(this.textContent)) {
this.parentNode.parentNode.style.display = "none";
} else {
console.log(this.parentNode.parentNode.tagName);
console.log(this.textContent);
}
});
}
})();