Skip to content

Instantly share code, notes, and snippets.

@hekt
Last active October 11, 2015 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hekt/3834816 to your computer and use it in GitHub Desktop.
Save hekt/3834816 to your computer and use it in GitHub Desktop.
Yahoo!ニュースのスポーツカテゴリから有害なソースを排除する
// ==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