Skip to content

Instantly share code, notes, and snippets.

@pedrolemoz
Last active March 6, 2023 05:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pedrolemoz/0b913160301de676a575c2e11a2ee3fe to your computer and use it in GitHub Desktop.
Save pedrolemoz/0b913160301de676a575c2e11a2ee3fe to your computer and use it in GitHub Desktop.
Responde Aí Paywall Remover
let book = document.getElementById("livro").cloneNode(true);
let classNames = [
"sc-sspg3m-0 eHxMNi",
"sc-1gelwlk-0 hxgNbb",
"sc-sspg3m-5 jrpxZf",
"sc-sspg3m-6 boCaKs",
"sc-sspg3m-8 iRLKDk",
"sc-sspg3m-9 cHLEwn",
"sc-1iousas-0 jKQDwC",
];
for (let name of classNames) {
let elements = book.getElementsByClassName(name);
for (let element of elements) {
element.remove();
}
}
let style = "blur(5px)";
let newHTML = book.outerHTML.replaceAll(style, "");
let newWindow = window.open("about:blank", "", "_blank");
newWindow.document.write(newHTML);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment