// ==UserScript== // @name KN Paywall Killer // @description A script that removes paywall from Websites of Redaktionsnetzwerk Deutschland like Kieler Nachrichten (KN+), Ostsee-Zeitung (OZ+) and Hannoversche Allgemeine (HAZ+) articles by copying the article text from a script element in the source code into the body. // @description:de Ein Skript, das die Paywall in Artikeln auf Websites des Redaktionsnetzwerks Deutschland wie Kieler Nachrichten (KN+), Ostsee-Zeitung (OZ+) und Hannoversche Allgemeine (HAZ+) entfernt, indem es den Artikeltext aus einem Skript im Quelltext in den Body kopiert // @include https://www.kn-online.de/* // @include https://www.ostsee-zeitung.de/* // @include https://www.haz.de/* // @namespace Discostu36/KN-Paywall-Killer // @run-at document-idle // @version 1.5 // @license MIT // @downloadURL none // ==/UserScript== var paywall = document.querySelector(".paywall"); var paywall2 = document.querySelector('[id^="piano-lightbox-article-"]'); var contentScript = document.querySelectorAll("script[type='application/ld+json']")[2]; var contentObject = JSON.parse(contentScript.text); var articleBody = contentObject.articleBody.replace(" Lesen Sie auch", ""); var descriptionP = document.querySelector(".ArticleHeadstyled__ArticleTeaserContainer-sc-1xd2qac-1"); var bodySpan = document.querySelector(".Textstyled__InlineText-sc-14jlruk-1"); var contentLoader = document.querySelector("#article > svg") var contentLoaderGradient = document.querySelector(".ArticleContentLoaderstyled__Gradient-sc-1npmba7-0") if (paywall != null) { paywall.remove(); addContent(); } else if (paywall2 != null) { paywall2.remove(); addContent(); } function addContent() { if (contentLoader) { contentLoader.remove() } if (contentLoaderGradient) { contentLoaderGradient.remove() } descriptionP.classList.remove("jgJYOM", "dInetR"); bodySpan.innerHTML = articleBody; if (bodySpan.parentElement.nextSibling) { bodySpan.parentElement.nextSibling.remove(); } };