Skip to content

Instantly share code, notes, and snippets.

@1000k
Last active January 4, 2016 04:48
Show Gist options
  • Save 1000k/8570609 to your computer and use it in GitHub Desktop.
Save 1000k/8570609 to your computer and use it in GitHub Desktop.
Yahoo! ニュースのヘイトスピーチだらけで見るに堪えないコメント欄を非表示にする Greasemonkey スクリプト。 Chrome の Tempermonkey で動作確認済み。 参考: https://gist.github.com/eristoddle/4440713
// ==UserScript==
// @name Hide Yahoo News Comments
// @namespace http://headlines.yahoo.co.jp/
// @version 0.1
// @description Hide 'Yahoo! news' comments.
// @match http://headlines.yahoo.co.jp/*
// @copyright 2014, SENDA Keijiro
// ==/UserScript==
function addJQuery(callback) {
var script = document.createElement("script");
script.setAttribute("src", "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
script.textContent = "window.jQ=jQuery.noConflict(true);(" + callback.toString() + ")();";
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
}
function hideComment() {
jQ('#commentTabContents').hide();
}
addJQuery(hideComment);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment