Ignore the onion paywall

Alec Jacobson

August 13, 2011

weblog/

Was watching the onion video channel today and to my surprise they have a paywall like nytimes. To be honest at first I thought it was a joke. But in the end it's just as easy to get around as the nytimes one. Just a little client side javascript gets ride of the paywall screen:
document.getElementById('gregbox-overlay').style.display = "none";
document.getElementById('gregbox-wrap').style.display = "none";
And here's an applescript which calls that javascript on the frontmost safari window.
tell application "Safari"
	try
		set doc to front document
		do JavaScript "document.getElementById('gregbox-overlay').style.display = 'none';" in doc
		do JavaScript "document.getElementById('gregbox-wrap').style.display = 'none';" in doc
	on error errText number errNum
	end try
end tell