2018-06-03

UserScriptアップデート

もっと良い書き方があったらご指摘ください

const ngWords = [ /安倍/, /低能|低脳/, /麻生太郎はすごいあほだ/ ] ;

if(document.location.href.startsWith("https://anond.hatelabo.jp")) {

sections = document.getElementsByClassName('section');

Array.prototype.slice.call(sections).forEach(function(section, i, all) {

contain = Array.prototype.slice.call(section.children).filter(function(child, j, all) {

return ngWords.filter((ngWord) => {

if(ngWord.test(child.innerText)) {

return true;

}

}).length > 0;

}).length > 0;

if(contain){ section.style.display = 'none'; }

});

}

記事への反応(ブックマークコメント)

ログイン ユーザー登録
ようこそ ゲスト さん