Created
February 15, 2010 08:06
-
-
Save prasincs/304474 to your computer and use it in GitHub Desktop.
This file contains 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 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