Last active
December 31, 2015 20:09
-
-
Save breyten/8038178 to your computer and use it in GitHub Desktop.
Hide Bitcoin articlens on HN with TamperMonkey
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 HNBitcoinHider | |
// @namespace http://yerb.net/ | |
// @version 0.1 | |
// @description Hide bitcoin news items on Hacker News | |
// @match https://news.ycombinator.com* | |
// @copyright 2013, Breyten Ernsting | |
// @require http://code.jquery.com/jquery-latest.js | |
// ==/UserScript== | |
var titles = new Array(); | |
var elements = $('td.title'); | |
elements.each(function() { | |
titles.push($(this)); | |
}); | |
var patt = /bitcoin/i; | |
$.each(titles, function(index, title_elem) { | |
if (patt.test($(title_elem).text())) { | |
$(title_elem).parent().hide(); | |
$(title_elem).parent().next().hide(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment