Medium 簡潔化

移除位於https://*.medium.com/*頁面下方的註冊提示,以及移除非必要的內容。

目前為 2024-08-03 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Medium 簡潔化
// @name:es      Medium Simplify.
// @name:zh      Medium 简洁化
// @name:zh-CN   Medium 简洁化
// @name:zh-TW   Medium 簡潔化
// @description         移除位於https://*.medium.com/*頁面下方的註冊提示,以及移除非必要的內容。
// @description:es      Remove the registration prompt located at the bottom of the https://*.medium.com/* page and remove unnecessary content.
// @description:zh      移除位于https://*.medium.com/*页面下方的注册(不可用)提示,以及移除非必要的内容。
// @description:zh-CN   移除位于https://*.medium.com/*页面下方的注册(不可用)提示,以及移除非必要的内容。
// @description:zh-TW   移除位於https://*.medium.com/*頁面下方的註冊提示,以及移除非必要的內容。
// @author       TOC SH
// @license      MIT
// @namespace    none
// @match        https://*.medium.com/*
// @icon         https://telegra.ph/file/6eb4ebf4ed38fa9f2b87c.png
// @grant        none
// @version      1.4
// ==/UserScript==

(function() {
    'use strict';

    var t1 = Date.now();

    var tryRemove = function() {
        var selectors = [
            '.tv.t.tw.v.tx.ty.tz.ua.ub.uc.ab.q.cn.fi',
            '.rf.t.rg.v.rh.ri.rj.rk.rl.rm.ab.q.cn.fi',
            '.p.q.r.ab.ac',
            '.rg.rh.ri.rj.rk.l.bw',
            '.sq.sr.ss.st.su.l.bw',
        ];
        var elements = document.querySelectorAll(selectors.join(', '));
        if (elements.length > 0) {
            elements.forEach(function(element) {
                element.remove();
            });
        } else if (Date.now() - t1 < 5000) {
            setTimeout(tryRemove, 16);
        }
    };
    tryRemove();
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址