Last active
October 11, 2015 08:58
-
-
Save hekt/3834816 to your computer and use it in GitHub Desktop.
Yahoo!ニュースのスポーツカテゴリから有害なソースを排除する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name remove rubbish | |
// @namespace http://www.hekt.org/ | |
// @include http://dailynews.yahoo.co.jp/fc/sports/* | |
// ==/UserScript== | |
(function() { | |
var rs = [ | |
"日刊ゲンダイ", | |
"夕刊フジ", | |
"東スポWeb", | |
"NEWS ポストセブン" | |
]; | |
var ls = [].slice.call(document.querySelectorAll(".mdMain li")); | |
ls.forEach(function(li) { | |
for (var i = 0, len = rs.length; i < len; i++) { | |
if (li.textContent.indexOf(rs[i]) !== -1) { | |
li.style.display = "None"; | |
break; | |
} | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment