Last active
September 11, 2022 20:05
-
-
Save kidd/d53ca34477c45ee927105fc03b417973 to your computer and use it in GitHub Desktop.
disable paywal for medium et al
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 TowardsDataScience/hbr/medium auto open in incognito | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author Raimon Grau | |
// @match https://towardsdatascience.com/* | |
// @match https://hbr.org/* | |
// @match https://medium.com/* | |
// @match https://*.medium.com/* | |
// @match https://*.nytimes.com/* | |
// @grant GM.openInTab | |
// ==/UserScript== | |
// updates(?) at: https://puntoblogspot.blogspot.com/2020/12/disable-towardsdatascience-and-hbr.html | |
(async () => { | |
const host_paywall = { | |
"hbr.org": "paywall-overlay-panel" , | |
"towardsdatascience.com": "regwall-background-color", | |
"medium.com": "regwall-background-color", | |
"nytimes.com": "gateway-content", | |
} | |
if (! GM_info.isIncognito && document.getElementById(host_paywall[window.location.host] || "regwall-background-color")) { | |
const tab = await GM.openInTab(window.location.href, { incognito: true }); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment