Skip to content

Instantly share code, notes, and snippets.

@Arefu
Last active December 4, 2025 02:17
Show Gist options
  • Select an option

  • Save Arefu/6909222831da30926448077594f56c0a to your computer and use it in GitHub Desktop.

Select an option

Save Arefu/6909222831da30926448077594f56c0a to your computer and use it in GitHub Desktop.
Make NZ Herald premium articles free to view
// ==UserScript==
// @name Free NZHerald
// @include *nzherald.co.nz*
// @version 1
// @description Freedom of information is more important than any amount of money
// @author Arefu (Johnathon)
// @grant none
// ==/UserScript==
//I've tested this on FireFox with Tampermonkey. I hate Herald and everything they stand for, they steal articles and don't give credit, they have biased journalism and just generally crappy reporters.
//This is for all the articles they stole from Reddit and Facebook without due credit and copy pasting any clickbait websites like BuzzFeed.
//News has to be free to help democracy be free, step your game up Herald.... Step it up.
var Free = document.getElementsByClassName("premium-content");
Free[0].className = "";
@brettnz536
Copy link

Hi
New to github - came here for your code to get past nzherald paywall. Think i have installed this correctly, but doesn't appear to be working. Does this script still work? thanks

@Arefu
Copy link
Author

Arefu commented Dec 8, 2019

Apparently not, I don't know how good my JavaScript is to fix it, but if you know a little about using Inspect Element just look for the class called "QUnWjUZnT0nf" and with a Style with "display:none;"

If you don't know what I am talking about I'll try update this at some point! Sorry I can't get onto it right now

@keithn
Copy link

keithn commented Jun 11, 2021

@brettnz536 and @Arefu you can use https://greasyfork.org/en/scripts/427731-see-it-all. Just install violentmonkey (or tampermonkey, or whatever userscript runner you want)

@Arefu
Copy link
Author

Arefu commented Dec 4, 2025

This method is out of date.

I likely won't make a new update for this to support the latest changes, however, you are still served premium content via their server.
I think the Class names will be random, but for me during testing they appear to be fine, though I am sure you'll be able to work this out using JS. I for one, won't be.

ehSvJlTQHTuOTYQ is a CSS Selector that I have seen, though they are likely rotated often given it is not a sensible string.
They also force display: none; on every paragraph from the article.
There is also finally article-paywall-hide which every sub-element has the same CSS Selector, and the same Style forced on it.

If there is want for this, I can look at making a new extension for people. I am still very much Anti-NZHerald.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment