Skip to content

Instantly share code, notes, and snippets.

@runmaxde
Last active October 8, 2023 20:45
Show Gist options
  • Save runmaxde/8c85f28c5d8facebf0ddeb67abe6c8fd to your computer and use it in GitHub Desktop.
Save runmaxde/8c85f28c5d8facebf0ddeb67abe6c8fd to your computer and use it in GitHub Desktop.

Remove Paywall of Webpage with a Browser Bookmark

This simple JavaScript bookmark lets you bypass website paywalls by removing specific domains from the current page's URL. Whenever you encounter a paywalled page, click this bookmark, and it will instantly redirect you to the freely accessible content.

Usage:

  1. Create a New Bookmark: Right-click your browser's bookmark bar and select "Add Page" (or a similar option depending on your browser).
  2. Name Your Bookmark: Enter a name for the bookmark, such as "Remove Paywall."
  3. Paste the Code: In the URL/Location field, paste the following JavaScript code:
javascript:(function()%7Blet%20t%20%3D%20window.location.href%3B%0Alet%20n%20%3D%20%22https%3A%2F%2Fremovepaywall.com%2F%22%20%2B%20t%3B%0Awindow.location.href%20%3D%20n%3B%7D)()%3B
  1. Save Your Bookmark: Save the bookmark. Now, whenever you encounter a paywalled page, click the bookmark in your bookmark bar, and it will remove the paywall and redirect you to the accessible content.

Source code

let t = window.location.href;
let n = "https://removepaywall.com/" + t;
window.location.href = n;

How this wa created

https://caiorss.github.io/bookmarklet-maker/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment