Created
February 17, 2019 04:40
-
-
Save bossanova808/515dddeb8e7f459457b5a94479ded876 to your computer and use it in GitHub Desktop.
Userscript to Remove The Australian paywall.
This file contains hidden or 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 Remove The Australian Paywall | |
// @version 1 | |
// @grant none | |
// @match *://www.theaustralian.com.au/* | |
// ==/UserScript== | |
window.addEventListener('load', function() { | |
console.log("Removing the Australian paywall overlay..."); | |
// Remove the paywall class from the <html> element itself | |
var elem = document.documentElement; | |
elem.classList.remove("lightcase-open"); | |
//Get rid of all the blocking elements/messages | |
var elem1 = document.getElementsByClassName("subscribe-popover"); | |
//HTMLCollection... | |
while(elem1.length > 0) { | |
elem1[0].remove(); | |
} | |
var elem2 = document.getElementById("lightcase-overlay").remove(); | |
var elem3 = document.getElementById("lightcase-loading").remove(); | |
var elem4 = document.getElementById("lightcase-case").remove(); | |
var elem5 = document.getElementById("lightcase-nav").remove(); | |
}, false); |
How are you using this exactly?
(I tried adding the JS part in contentScript.js and added the appropriate permissions in manfiest.json, it helped a little, it hid the small popup that appears after a second, but I still get the entire paywall block on some articles sometimes. I can't just dump CSS in contentScript.js)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Or event simpler - and no flash! - just use the top bit, i.e.
and use Stylish to block the rest...