Skip to content

Instantly share code, notes, and snippets.

@stephenyeargin
Created August 2, 2012 00:08
Show Gist options
  • Save stephenyeargin/3231756 to your computer and use it in GitHub Desktop.
Save stephenyeargin/3231756 to your computer and use it in GitHub Desktop.
Removes Paywall on select Gannet properties, namely the Tennessean.
// ==UserScript==
// @name PaywallHop
// @namespace gist.github.com/stephenyeargin/paywallhop
// @description Removes Paywall on select Gannet properties, namely the Tennessean.
// @include http://*.tennessean.com/*
// @version 1
// ==/UserScript==
// Make sure jQuery is loaded
(function(){
function GM_wait() {
if(typeof unsafeWindow.jQuery == 'undefined') {
window.setTimeout(GM_wait,100);
} else {
unsafeWindow.jQuery(function() {
letsJQuery(unsafeWindow.jQuery);
});
}
}
GM_wait();
// Start cleaning up the mess
function letsJQuery($) {
// Make the page scrollable again
$('html').attr('style', '');
$('body').attr('style', '');
// Remove everything related to the paywall
$('.firefly').remove();
// Remove the background itself
$('#modalouter_dm').remove();
// Remove the iframes (with extreme prejudice)
$('iframe').remove();
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment