Skip to content

Instantly share code, notes, and snippets.

@TheEpicFace007
Created September 22, 2021 02:14
Show Gist options
  • Save TheEpicFace007/7ca80d43ec7c3315e274a0481b893820 to your computer and use it in GitHub Desktop.
Save TheEpicFace007/7ca80d43ec7c3315e274a0481b893820 to your computer and use it in GitHub Desktop.
remove all the pro article off of nknews
// ==UserScript==
// @name Hide Pro Article
// @description This is your new file, start writing code
// @match https://www.nknews.org/*
// ==/UserScript==
function clearPayWall () {
for (const proArticle of document.querySelectorAll(".proLabel")) {
{
const article = proArticle.parentElement.parentElement.parentElement.parentElement
if (article.className === "singleHeadlinePost" || article.className === "singleFeaturedCategory") {
console.log("removed article!")
article.remove();
}
}
{
const article = proArticle.parentElement.parentElement
if (article.classList[0] == "moreNewsSlide")
article.remove()
}
}
}
window.addEventListener('load', clearPayWall, false);
setInterval(clearPayWall, 10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment