Last active
March 16, 2024 17:33
-
-
Save dleshem/68dc97d8f47a124b86d25d4ba918ab6b to your computer and use it in GitHub Desktop.
Tampermonkey userscript to redirect paywalled haaretz.co.il articles to archive.is
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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