Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Four JavaScript Lines to Defeat New York Times Paywall (euri.ca)
60 points by privacyguru on March 22, 2011 | hide | past | favorite | 60 comments


And in about 4 lines of code I can use a timeout or PeriodicalExecuter to periodically check the the visibility of these elements and revert them if necessary.

I can have it deployed on http://graphics8.nytimes.com/js/common.js which is on every page within the next 20 minutes (if I skipped code review etc). Any developer here at the Times could do that and anything else that was required.

The point is I won't.

We'd rather fix bugs that affect our readers and work on making the site better. Thats much more rewarding.

However if you feel that the Times content is worth writing a new browser extension for, or all the hours you spend keeping on top of updating code as we change DIV id and class names.... then maybe, just maybe, there might be something on the Times site of value?

Maybe worth (dare I say it...) actually paying for.... ? Gasp!

UPDATE: Hi NiemanLab & This is just my own personal opinion :)


Right, and I could again disable your timer, which would just lead to a JS arms race. Why send the content to the non-authenticated client in the first place? Wait to get the confirmation that the person paid or is within quota, and then get the content via a POST request...

Edit: I'm not condoning stealing content, just wondering why you're depending on the client to self-censor.


Because the point is not to lock the NYT's content inside an impenetrable DRM fortress, it's to get those that consume its content the most to contribute to its production costs. I don't think the paywall has been structured very well but I do think anyone who choses to circumvent it to keep accessing the content for free is going to feel more than a little rueful if it stops being produced at all.


>However if you feel that the Times content is worth writing a new browser extension for, or all the hours you spend keeping on top of updating code as we change DIV id and class names.... then maybe, just maybe, there might be something on the Times site of value?

I don't care about most of the content, but like Feynman picking safes the interesting thing is the intellectual challenge of seeing if one can break the lock.

Also last time I tried to sign up (back when it was free) doing so was a total pain in the ass, so I ended up deleting the cookies instead.


And maybe you're a 14 year old who really wanted to read something on NYT or in some country where it's hard to give money to NYT.

You could also just keep data from being given to the user in the first place, but you won't do that, either.


1. This is more for the amusement of people who don't care, who will buy or not buy based on the value proposition. It's not the professional who is going to take advantage of this -- those of us in startup mode don't need the time sink of keeping up with the news, those of us not in startup mode have the money to buy.

2. That said, this is useful for the high school or college student who doesn't have the 20 dollars to spend.

I'd be more worried about people bypassing your page and just emailing the articles to each other, actually.


That said, this is useful for the high school or college student who doesn't have the 20 dollars to spend

I hear that a lot. Lots of people can't afford a subscription. I understand that.

A lot of the same people say its too much yet they spend more at Starbucks for their daily Venti, sugar-free, non-fat, vanilla soy, double shot, decaf, no foam, extra hot, Peppermint White Chocolate Mocha with light whip and extra syrup :)


Sure, but there aren't a half dozen coffee shops giving away free drinks on either side of Starbucks.


I wish those 'coffee' shops that are doing their own original reporting and embedding journalists in war zones and covering the costs associated it with that the very best of luck in making money and staying in business as the print market shrinks.


That must be a Manhattan thing. Do people really do that? I thought it was a joke!

/Arizona


"...those of us in startup mode don't need the time sink of keeping up with the news..."

And that is why startups are rarely successful.


I'm confused. Do you really think not keeping up with the news is the primary reason for the failure of startups?

Really?

Or did you just think it was a snappy retort?

If you really do think that the primary reason most startups fail is because they're not keeping up with the news, I'd really, really like to understand your point of view - I have a lot to learn.

Thanks.


I read it as: startups fail because they're not singularly minded.


I don't see how you can get that. The exchange was:

  > "...those of us in startup mode don't need
  > the time sink of keeping up with the news..."
That's saying that startups already don't have enough time to do what they need, so even more time sinks are a Bad Thing(tm)

The comment then was:

  > And that is why startups are rarely successful.
  >     ^^^^
The "that" seems to be referring to not keeping up with the news. That, in turn, then says to me that not keeping up with the news is the primary source of failure.

Maybe I'm wrong. I'd love to hear what he actually meant. I certainly can't parse it as you suggest.


Honest question: How is the paywall enforced for users with JavaScript disabled?


I'd need to double-check but its my understanding that getting the prompt to subscribe is not Javascript dependent.


Pretty disturbing how eager and willing HN readers are to circumvent the NYT paywall. Who cares how easy it is, if you like what they have to offer and want to see more of it, pay them for it. It costs money to produce quality content like that. It's not like the majority of the money is going to a bunch of crooks like in the music industry. It's like people that listen to public radio every day that don't support their local member stations, even though they have the money to do so...despicable!


I disagree with you about the quality of the content, but the only reason I would care to break that security is to show that I could, for the intellectual challenge of it.


You call that a challenge?


In theory, is this conversation similar to a group of people discussing the easiest way to break into a car?


I don't think so. I consider computer network traffic a lot different from the "unlocked door" analogy of physical property. Sure, you don't have permission to enter someone's home just because their door was unlocked or you found a clever way in. However, when you make a request to a web server and it returns a bunch of text that your browser renders as text/graphics, I think it's perfectly okay to change the way that rendering works.


True, but you're consenting to the terms of use of the provider in requesting that content. It's not just "text", it's content you've licensed from them for your use in keeping with a number of legal obligations (part of which, I'm guessing, is to not disable components intended to limit your consumption as a non-subscriber.) So it's not that clear cut.

Similarly, you could argue that when someone sends a movie to your home to watch over cable, you could do anything you want with a dvr recording of it. But we know that's not an argument that actually holds any water, legally or ethically.


Actually, the US Supreme Court decided in Sony vs. Universal (in 1984) that when someone sends a movie to your home, you do have the right to record it for subsequent (non-commercial) viewings.

Merely reading a news article is certainly non-commercial, so by the analogy you proposed I believe this JavaScript workaround is entirely legal.


I'm not sure that would apply here: in that case, you're talking about the right to make a backup copy of an item you've properly licensed, and then retain it only to use under the same terms as that original license.

In this case, you're taking content that you haven't paid for, and violating the terms it's distributed under by disabling some portions so you can consume it without paying.

I'd argue that's closer to disabling macrovision on a VHS tape so you can make a backup copy of a rental tape to keep for yourself, and I'm pretty sure that's verboten.


But in this case, they are actively trying to "lock" their door. Speaking abstractly, this misalignment of interests has nothing to do with the mechanisms of action.

That's like saying the cops can use heat-sensors to look at houses, because thats just electromagnetic signal and you can render it however you want. No invasion of privacy there right?


Cops shouldn't use heat sensors without a warrant solely because of the privacy issue. They can certainly look at your house while passing by, which is also just a function of electromagnetic signals.

I would argue that since the NYT is willfully delivering you the content of an article and merely instructing your browser to conceal it, that's a far cry from "trying to 'lock' their door." If someone was distributing their username/password or an authorized cookie, or using a server-side exploit to access content, then I think that would constitute a breach of ethics if not law.

Basically, my point is that once the NYT willfully transmits data to your computer, you should be able to manipulate it any way you wish, obviously barring any sort of commercial use or redistribution that violates copyright laws. Anyway, it's not that hard to protect data from certain users and make it available to others. That's a design pattern as old as multi-user computer systems/networks.


Right. This is like someone parking an unlocked car with a blank title and a full tank of gas on your front lawn and leaving it there for a week.


I don't like any analogy involving actual property, because actual physical property has natural scarcity.

When you make a web request to the NYT servers, they are willfully distributing a copy of that content to you. Obviously, you're not allowed to do anything you want with the content (like sell or otherwise redistribute it), but I certainly think you can manipulate it and view it any way you want.


"Anyone want a calendar?"

"Yeah, I'd love one."

"Here you go; for your convenience, it's got a speaker to remind you to get an oil change at my garage."

"Huh, that's weird, but I'll just remove the battery and I won't hear the message."

Once the bits leave the nytimes.com server and travel to my computer, they don't control how I use them. I can't break laws (e.g., republish the words as my own), but if I don't want to see part of the page, that's my prerogative.


Well, then you should really have said:

"No thank you. Please keep your calendar"

and I would wish you well on your way.


Is using an ad-blocker unethical for the same reason?


I would say yes, it is. If you like the website, don't cheat them out of some ad revenue. Don't you want them to be able to keep doing what they do?


Or maybe more similar, in effect, to getting free pieces of candy from a candy machine :).

Of course, there is a contingent that believes there is no similarity between something like this and stealing since nothing physical is taken (but I'm not in that camp).


Probably. Although it doesn't seem that NYT is trying to make their wall all that strong. With per month freebies, the exceptions for search engines, the exceptions for social networking and blogs, and having the security for their wall be done in javascript... they probably don't care that people who try hard enough can get at the low hanging fruit.. but then again, you're absolutely right in your assessment.


It's probably closer to trying to peek at what's behind a fence - that's innocent right?


A very fragile fence, in this case.


Sure but so what? I have discussed the best way to get away with murder with good friends.

Not that I would kill anybody, but simply because it is an intellectual challenge.


> Not that I would kill anybody

Made me think of this: http://video.google.com/videoplay?docid=-4097602514885833865...


You wouldn't steal a car would you?


Can't wait for all the browser extensions to be released. Install this in Chrome once and forget about it.


Even easier, just create a bookmark to which points to:

javascript:$('overlay').hide();$('gatewayCreative').hide();$(document.body).setStyle({overflow:'scroll'});

Ironically, I couldn't test it since the paywall never came up now matter how many articles I opened up.


I want a Chrome extension that does it in the background so I don't have to use a bookmarklet every time.


I made a user script for this a while ago: https://gist.github.com/880967 Just click one of the “raw” links to install.


If you just save this to a .user.js file, add the user script headers, and open that file in Chrome, it'll install it as an extension.

Edit: removed broken script.


That won’t work in all browsers. User scripts are executed in their own context and don’t know of plugins and libraries that are available on the page.

The good news is, you don’t need Prototype at all. I made this userscript this morning: https://gist.github.com/880967 Just click one of the “raw” links to install.


You're right, mine won't work. Taken down.


I made a user script for this a while ago: https://gist.github.com/880967 Just click one of the “raw” links to install.


Lengthy discussion of the same story from 21 hours ago:

http://news.ycombinator.com/item?id=2352023


I'd rather have paywalls than advertising. Still bummed out that TipJoy (YC08) never made it.


From the description I've read, even after you pay, you're still shown ads.


When you pay for the physical newspaper you still have ads too. I'm not surprised that they are translating this to online...


Alternatively, if you just want the content.. Right Click -> View Source


Another way to defeat the paywall is to use a link on Twitter. https://twitter.com/#!/freeNYTimes uses the NY Times API to share all stories that the paper publishes online.


Isn't it better to put up some CSS asking for money than to impose all sorts of DRM to annoy your paying customers? I for one, am more willing to (continue to) pay for a NYT subscription knowing that the payfence is very lightweight.


How is this used ? Do I just copy this into the address bar ?


You can arbitrarily inject javascript on any page after launch.

Here's how to do it in Safari http://www.youtube.com/watch?v=34D7IR7lNHc

Chrome: View > Developer > Javascript Console

Firefox: Install the firebug extension, which does autocompletion and makes developing much more fun. Not sure if this still works in Firefox 4


Nope you need to use console. Switch on dev tool bar on Safari or CTRL + Shift + C in Chrome and then console, paste, run.


You don't need the console.


Sorry - you don't need the console to inject JavaScript into the page. But for the code linked at the top of the page, you will.

See the code above that begins with "javascript:" and you can use that to inject the javascript through the URL bar!


yes, just use the address bar and preface with "javascript:"




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: