Skip to content

Instantly share code, notes, and snippets.

@wulczer
Created October 6, 2011 12:08
Show Gist options
  • Save wulczer/1267253 to your computer and use it in GitHub Desktop.
Save wulczer/1267253 to your computer and use it in GitHub Desktop.
Fix HN
var jq = document.createElement('script');
jq.type = 'text/javascript';
jq.src =' https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js';
jq.onload = function() {
console.log(window.jQuery);
var el = jQuery('table')[2];
var block = false;
var blacklisted = /steve|jobs|apple/i;
jQuery('tr', el).each(function(_, elt) {
var td = jQuery('td.title', elt).children('a')[0];
if (td)
block = blacklisted.test(jQuery(td).text());
if (block)
jQuery(elt).hide();
});
};
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(jq, s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment