6 ms·
Four JavaScript Lines to Defeat New York Times Paywall
- MatthewPhillips 16y agoCan't wait for all the browser extensions to be released. Install this in Chrome once and forget about it.
- mrduncan 16y agoEven 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.
- MatthewPhillips 16y agoI want a Chrome extension that does it in the background so I don't have to use a bookmarklet every time.
- tghw 16y agoIf 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.
- mathias 16y agoThat 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 https://gist.github.com/880967 Just click one of the “raw” links to install.
- tghw 16y agoYou're right, mine won't work. Taken down.
- mathias 16y agoI made a user script for this a while ago: https://gist.github.com/880967 https://gist.github.com/880967 Just click one of the “raw” links to install.
- mathias 16y agoI made a user script for this a while ago: https://gist.github.com/880967 https://gist.github.com/880967 Just click one of the “raw” links to install.
- marcamillion 16y agoHow is this used ? Do I just copy this into the address bar ?
- kaichanvong 16y agoNope you need to use console. Switch on dev tool bar on Safari or CTRL + Shift + C in Chrome and then console, paste, run.
- rsoto 16y agoYou don't need the console.
- kaichanvong 16y agoSorry - 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!
- drake2010 16y agoYou can arbitrarily inject javascript on any page after launch. Here's how to do it in Safari http://www.youtube.com/watch?v=34D7IR7lNHc 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
- zoomzoom 16y agoyes, just use the address bar and preface with "javascript:"
- arepb 16y agoI'd rather have paywalls than advertising. Still bummed out that TipJoy (YC08) never made it.
- 404error 16y agoIn theory, is this conversation similar to a group of people discussing the easiest way to break into a car?
- chwahoo 16y agoOr 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).
- MatthewPhillips 16y agoProbably. 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.
- badhairday 16y agoYou wouldn't steal a car would you?
- MatthewPhillips 16y agoIs using an ad-blocker unethical for the same reason?
- fletchowns 16y agoI 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?
- baddox 16y agoI 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.
- Que 16y agoAlternatively, if you just want the content.. Right Click -> View Source
- deleted 16y ago[deleted]
- donohoe 16y agoAnd 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 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 :)
- notphilatall 16y agoRight, 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.
- msy 16y agoBecause 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.
- ebiester 16y ago1. 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.
- p0ppe 16y agoAnother way to defeat the paywall is to use a link on Twitter. https://twitter.com/#!/freeNYTimes https://twitter.com/#!/freeNYTimes uses the NY Times API to share all stories that the paper publishes online.
- RiderOfGiraffes 16y agoLengthy discussion of the same story from 21 hours ago: http://news.ycombinator.com/item?id=2352023 http://news.ycombinator.com/item?id=2352023
- fletchowns 16y agoPretty 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!
- tomjen3 16y agoI 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.
- fletchowns 16y agoYou call that a challenge?
- gluejar 16y agoIsn'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.