Want VIP access? Get the latest tutorials, videos, giveaways and more!

×

Defeat the New York Times Paywall with 2 lines of CSS (or a Chrome Extension)

Mar 23 2011

If you haven’t heard, the New York Times has implemented a paywall where you can only view 20 articles a month. After that they throw an overlay on top of the content so you can’t view it.

Since they still want to be indexed by search engines, they don’t bother to hide the content once you have reached your 20 max. Two simple lines of CSS will hide this. I’ve also made it into a Chrome Extension

Update: Just want to be clear that this is not about the NYT business model or getting stuff for free. If you want  to view the NYT, pay for it. This also isn’t a hack or a security intrusion, its simply hiding a div that is overlaying the content. The same results can be achieved by disabling javascript or selecting “no style” in your favorite browser. This is simply a tutorial on how to style the content of a page to your liking.

Update 2: Looks like New York Times have updated their CSS classes from #gatewayCreative to #gatewayUnit in an effort to thwart cheaters.  I will not be updating the extension as this wasn’t intended to get around the wall for free but rather to expose how hilarious their pay wall security was. I think that point has been made, feel free to fork this plugin.

Update 3: Now Google has taken down the extension. Not sure why, may have been for using the NYT logo, may be more serious. Either way, it was fun while it lasted :)

Video

Code

#overlay, #gatewayCreative { display: none !important; visibility: hidden !important; }
body { 	overflow: scroll !important; }

Then create a manifest.json file to register the Google Chrome Extension

{
	"name" : "New York Times Paywall Smasher",
	"version"  : "1.0",
	"description" : "Disables the New York Times Paywall",
	"browser_actions" : {
		"icons" : {
			"128" : "icon128.png",
			"48" : "icon48.png",
			"16" : "icon16.png"
		}
	},
	"content_scripts" : [{
		"matches": ["http://www.nytimes.com/*"],
		"css" : ["nyt.css"]
 	}]
}

Load the chrome extension into developer view and say goodbye to the paywall (at least until they implement something that isn’t defeated with display: none). Install Chrome Extension.

This entry was posted in CSS. Bookmark the permalink.

22 Responses to Defeat the New York Times Paywall with 2 lines of CSS (or a Chrome Extension)

  1. Martin says:

    As a fellow Canadian, and someone else who frequently “ignores” pathetic attempts at security on the web, I’m actually curious if you’ll get yourself into any trouble for this article. Canadian laws for technology are not well known, and what is known is not very specific. The more angry folks down in the states may classify this as “picking a digital lock”, and may try to start a ruckus. I’ll be watching your site now out of curiosity, so please do update if any legal matters arise.

    • Darcy Clarke says:

      I doubt there will be an sort of legal ramifications. Technically, they’ve left all the information on the page anyways (most likely for SEO purposes as Wes notes). The overlay wouldn’t hinder you from reading it if you were disabled and required the use of a screen reader (which disables Javascript and CSS). This isn’t a hack or illegal by any means. If the site is passing that information to your browser to be rendered client side then they have no control over how you manipulate the DOM to display information on your end. If you were a developer you’d understand.

  2. Tahnka says:

    Hah…that’s cool. Thanks!

  3. Pingback: Times To Pay The Price « On the Beat.

  4. Dakota says:

    Maybe you should set “scroll” on overflow-y only, since otherwise there’s an empty scrollbar on the bottom edge.

  5. Blame Canada says:

    This is a violation of US Law – The Digital Millenium Copyright Act. This is an act of War! Invade! Invade! :)

  6. idiot says:

    I do not understand…’load unpacked extensions’. select the folder that you have it in…huh?

  7. Pingback: New York Times paywall put to the test « Bruce Tyson's Blog

  8. robin says:

    fwiw: using firefox and noscript, forbid scripts coming from nyt.com, which prevents mtr.js from running…………..

  9. Pingback: speaking of unlikely budgets « orgtheory.net

  10. anon says:

    So now it would be something like:

    #overlay, #gatewayCreative, #gatewayUnit { display: none !important; visibility: hidden !important; }
    body { overflow: scroll !important; }

    and in chrome extension format,

    http://www.easy-share.com/1914457146/nyt2.crx

    right?

  11. Huck says:

    You don’t even need javascript. Just use Chrome in Incognito mode or Firefox in Private Browsing mode.

    Now read as much as you want!

    Pretty lame technology for the 40 million dollars they spent!

  12. Pingback: Waltzing Through the NYT Paywall with AdBlock Plus « the Sam Jackson College Experience

  13. Pingback: Hill SEO | The Strategy Behind the New York Times’ Paywall

  14. Phong Le says:

    People who say that the 40 million is ill spent is missing the point. The NYTimes is still tracking you when you hide the divs. It knows that you are doing it. That 40 million is being spent on the back-end.

    To defeat the firewall and not get track, go this

    http://lelandusa.blogspot.com/2011/05/defeat-nytimes-paywall-with.html

  15. Pingback: Google Chrome extension busts Murdoch paywall | Technology News

  16. UGN says:

    I know your objective was to illustrate the weakness of the paywall – in that vein, I slapped together a simple chrome extension that truncates the variable part of the articles’ URLs. Meaning, I use a simple regex to redirect to a new variable-free URL… There might be instances where this conflicts with a slideshow or something, but pretty painless for me otherwise.

    Link: http://www.filedropper.com/nyturltrim

    Source:

    manifest.Json
    {
    “name” : “NYT URL Trimmer”,
    “version” : “1.0”,
    “description” : “Trims NYT URLs to remove variables (everything after the question mark).”,
    “permissions”: [
    “tabs”,
    “http://*.nytimes.com/*”
    ],
    “background_page”: “Trim.html”
    }

    trim.html

    chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab){
    if(tab.url.match(/.*nytimes\.com.*\?/)) {
    var newurl = tab.url.replace(/\?.*/, “”);
    chrome.tabs.update(tab.id, {url: newurl});
    }
    });

  17. Pingback: Ex-Googlers Launch ‘NYT For A Nickel’ As Publicity Stunt; NYT Not Amused — paidContent

  18. Pingback: Episode 22- The 411 in 140

  19. Pingback: 6 Different Ways to Bypass The Paywall And Access Articles on NYTimes.com | Code for Share

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>