Greasy Fork

Greasy Fork is available in English.

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.5
// ==/UserScript==

(function() {
    'use strict';
    const selectors = [
        '*.ab.q.cn.fi',
        '*.ab.ac',
        '*.l.bw'
    ];
    function removeElements() {
        selectors.forEach(selector => {
            const elements = document.querySelectorAll(selector);
            elements.forEach(element => element.remove());});}
    const observer = new MutationObserver(removeElements);
    const config = { childList: true, subtree: true };
    observer.observe(document.body, config);
    removeElements();
})();