Skip to content

Instantly share code, notes, and snippets.

@greghunt
Created November 2, 2021 22:56
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 greghunt/ed068af6972e418e39f652b396fbfecd to your computer and use it in GitHub Desktop.
Save greghunt/ed068af6972e418e39f652b396fbfecd to your computer and use it in GitHub Desktop.
By-pass New York Times Pay Wall Article
var w = window.open("Article", "blank"); var content = Array.prototype.map.call(document.querySelectorAll('.StoryBodyCompanionColumn'), ( el ) => `<p>${el.textContent}</p>` ).join(''); w.document.write(`<link rel="stylesheet" href="https://unpkg.com/tailwindcss@1.4.6/dist/base.min.css"><link rel="stylesheet" href="https://unpkg.com/tailwindcss@1.4.6/dist/components.min.css"><link rel="stylesheet" href="https://unpkg.com/@tailwindcss/typography@0.1.2/dist/typography.min.css"><link rel="stylesheet" href="https://unpkg.com/tailwindcss@1.4.6/dist/utilities.min.css"><body class="prose mx-auto my-20">${content}</body>`); w.document.close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment