Created
August 2, 2012 00:08
-
-
Save stephenyeargin/3231756 to your computer and use it in GitHub Desktop.
Removes Paywall on select Gannet properties, namely the Tennessean.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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