Unlock All Medium.com Blogs

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

当前为 2025-02-19 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Unlock All Medium.com Blogs
// @description  Bypass all medium blogs paywall (external domains and subdomains too)
// @version      1.1
// @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';
    }
})();