Skip to content

Instantly share code, notes, and snippets.

@dleshem
Last active March 16, 2024 17:33
Show Gist options
  • Save dleshem/68dc97d8f47a124b86d25d4ba918ab6b to your computer and use it in GitHub Desktop.
Save dleshem/68dc97d8f47a124b86d25d4ba918ab6b to your computer and use it in GitHub Desktop.
Tampermonkey userscript to redirect paywalled haaretz.co.il articles to archive.is
// ==UserScript==
// @name Bypass Haaretz Paywall
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Redirect paywalled haaretz.co.il articles to archive.is
// @author Danny Leshem
// @match https://www.haaretz.co.il/*
// @match https://www.haaretz.com/*
// @match https://www.themarker.com/*
// @grant none
// ==/UserScript==
(() => {
setTimeout(() => {
const url = new URL(window.location.href);
if (url.pathname !== '/') {
url.search = '';
window.location.href = `https://archive.is/newest/${url.href}`;
}
}, 1000);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment