| If it is an interesting enough article to attract a fair amount of comments, which is reasonably common with NYT articles, there will usually be enough information in the comments here to make the thread worthwhile without reading the article. This is especially true if the article is about a controversial or contentious topic, because then people will often cite other articles in support of or opposition to the points of the article and those are often not behind paywalls. If it is a current events news article, there will also usually be other sources covering the same events you can turn to if the discussion is such that you really do need to read an article in order to follow along. If you want to filter them out, you could probably write a simple bookmarklet to do so. Here's something that almost works with HN's current page structure: (function () {
var stories = document.getElementsByClassName('storylink');
for (var i = 0; i < stories.length; ++i)
if (stories[i].href.includes('://www.nytimes'))
stories[i].parentNode.parentNode.hidden = 'hidden';})()
You can change the if statement to check for all the sites you want to hide (and to handle links to nytimes.com in addition to www.nytimes.com, and things like that). This doesn't quite hide it. The title line goes away, but the small gray line below with the points and the link to the comments remains, but I think that is fine. It's non-obtrusive and lets you see that something was removed.If you really want to get rid of that other line, this will do: (function () {
var stories = document.getElementsByClassName('storylink');
for (var i = 0; i < stories.length; ++i)
if (stories[i].href.includes('://www.nytimes')) {
stories[i].parentNode.parentNode.hidden = 'hidden';
stories[i].parentNode.parentNode.nextSibling.hidden = 'hidden';
}
})()
That will leave a small vertical space for the hidden items. That's the next row down from the two that are hidden, but stories[i].parentNode.parentNode.nextSibling.nextSibling.hidden = 'hidden'
doesn't get rid of it, so if you want it gone too, you'll have to poke around the page yourself and figure out how to reference it.Here's something you can put in a bookmarklet to un-hide all the hidden stories: (function () {
var stories = document.getElementsByClassName('storylink');
for (var i = 0; i < stories.length; ++i)
stories[i].parentNode.parentNode.hidden = '';})()
or this if you are using the version to hide both lines: (function () {
var stories = document.getElementsByClassName('storylink');
for (var i = 0; i < stories.length; ++i)
if (stories[i].href.includes('://www.nytimes')) {
stories[i].parentNode.parentNode.hidden = '';
stories[i].parentNode.parentNode.nextSibling.hidden = '';
}
})()
Disclaimer: I suck at JavaScript. There are probably better ways to do this. I don't know how portable this is (worked on Chrome and Firefox).To use, create a bookmark and set the URL to "javascript: <code from above>". You can paste in the "<code from above>" part. You don't have to do any encoding or putting it on one line. Both Firefox and Chrome will automatically do that for you. |