🏠 返回首頁 

Greasy Fork is available in English.

Unlock All Medium.com Blogs

Bypass all medium blogs paywall (external domains and subdomains too)


安装此脚本?
// ==UserScript==
// @name         Unlock All Medium.com Blogs
// @description  Bypass all medium blogs paywall (external domains and subdomains too)
// @version      1.2
// @match        *://*/*
// @author       SH3LL
// @license      MIT
// @namespace https://greasyfork.org/users/762057
// ==/UserScript==
(function() {
'use strict';
// Medium tag hook
const mediumTag = document.querySelector('meta[data-rh="true"][property="og:site_name"][content="Medium"]');
// Check the tag
if (mediumTag) {
console.log("Medium.com TAG Found");
const authorTag1 = document.querySelector('meta[data-rh="true"][name="author"]')
const authorTag2 = document.querySelector('meta[property="article:author"]')
if (authorTag1 || authorTag2) {
const unlocked_page="https://medium.rest/query-by-url?urlPost="+window.location.href;
console.log("Redirection to: "+unlocked_page);
window.location.href=unlocked_page;
} else {
console.log("Medium.com AUTHOR TAG Not Found. Not Redirected !");
}
} else {
console.log("Medium.com BLOG TAG Not Found. Not Redirected !");
}
// Change the background color of medium.rest
if(window.location.href.includes("medium.rest")){
document.body.style.backgroundImage = 'none';
let main_body = document.querySelector('.ci.bh.ez.fa.fb.fc');
main_body.style.maxWidth="10000px";
main_body.style.margin="0px";
}
})();