Last active
January 4, 2016 04:48
-
-
Save 1000k/8570609 to your computer and use it in GitHub Desktop.
Yahoo! ニュースのヘイトスピーチだらけで見るに堪えないコメント欄を非表示にする Greasemonkey スクリプト。
Chrome の Tempermonkey で動作確認済み。 参考: https://gist.github.com/eristoddle/4440713
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 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