Created
August 25, 2020 16:48
-
-
Save kamysheblid/7d185f398f425a8dd6c60252ff0f0f2e to your computer and use it in GitHub Desktop.
Bypass the annoying paywall on Medium.com and DataScience.com
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 Stop the Medium The Pay Wall | |
// @namespace StopThePayWall | |
// @version 1 | |
// @include *medium* | |
// @include *datascience* | |
// ==/UserScript== | |
async function abc () { | |
var resp = (await fetch(location, { "credentials": "omit", "headers": { "Accept": "text/html,text/xhtml,text/xml,*/*", "Connection": "keep-alive", }, "method": "GET", "mode": "cors" })); | |
var text = await resp.text(); | |
return await text; | |
}; | |
async function changeBody() { | |
var a = await abc(); | |
document.body.innerHTML = a; | |
}; | |
window.onload = changeBody() |
Unfortunately, sites that allow you to bypass paid articles like 12ft.io no longer work, Medium has changed the logic of how they generate access. I have written some open source workaround for the new Medium restriction: https://freedium.cfd
Dude, you nailed it. Thanks a lot!!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unfortunately sometimes not works.