Skip to content

Instantly share code, notes, and snippets.

@prasincs
Created February 15, 2010 08:06
Show Gist options
  • Save prasincs/304474 to your computer and use it in GitHub Desktop.
Save prasincs/304474 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Hide read news posts
// @namespace http://nextdoorhacker.com/projects
// @include http://news.ycombinator.com/
// @include http://slashdot.org/
// @include http://www.reddit.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js
// ==/UserScript==
(function() {
// This will be executed onLoad
// Append some text to the element with id #someText using the jQuery library.
var location = window.location.host;
switch(location){
case "news.ycombinator.com":
$("a:visited").parent().parent().each( function(){ $(this).hide(); $(this).next().hide();});
break;
case "slashdot.org":
$("a.datitle:visited").parent().parent().parent().hide();
break;
case "www.reddit.com":
$("a.title:visited").parent().parent().parent().hide();
break;
default:
break;
}
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment