Skip to main content

Four lines of code to hop over The New York Times paywall

posted onMarch 23, 2011
by hitbsecnews

Dave Eurica, a Canadian reader of the online version of The New York Times, was rather annoyed to find that the website was blocking him from reading a lot of articles. He looked into the matter and found that the "paywall" erected by the publication was written in JavaScript. This means the blocked articles are actually being loaded up in the HTML in the back.

Eurica wrote a bookmarklet that you can put on your bookmarks toolbar to get around the block. Anytime nytimes.com blocks you on a page, all you have to do is click it to show the usual content (it does nothing on any other website). The solution was written in just four lines of code, one of which is a comment:

//Prototype is already installed on NYTimes pages, so I'll use that:
$('overlay').hide();
$('gatewayCreative').hide();
$(document.body).setStyle( { overflow:'scroll' } );

The New York Times subscription plan was officially announced last week. Readers who view more than 20 articles will have to pay $15 a month to access NYTimes.com and the paper's mobile app, $20 for the site and its iPad app, or $35 for all three platforms. Subscribers to the physical paper will receive unlimited access across all digital platforms except e-readers.

Source

Tags

Software-Programming

You May Also Like

Recent News

Friday, November 29th

Tuesday, November 19th

Friday, November 8th

Friday, November 1st

Tuesday, July 9th

Wednesday, July 3rd

Friday, June 28th

Thursday, June 27th

Thursday, June 13th

Wednesday, June 12th

Tuesday, June 11th