Created
September 22, 2021 02:14
-
-
Save TheEpicFace007/7ca80d43ec7c3315e274a0481b893820 to your computer and use it in GitHub Desktop.
remove all the pro article off of nknews
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 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