Greasy Fork

来自缓存

Greasy Fork is available in English.

简书专注模式

去除简书一切不必要的页面元素

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         简书专注模式
// @namespace    https://gist.github.com/codethereforam/fe5b50b4e70414602d2b7a600055ae37
// @version      0.1
// @description  去除简书一切不必要的页面元素
// @author       https://github.com/codethereforam/
// @match        https://*.jianshu.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=jianshu.com
// @grant        none
// @license      GPL-3.0 License
// ==/UserScript==

(function() {
    'use strict';
    const main = document.querySelector('[role="main"]').children[0].children[0];
    document.body.innerHTML = "";
    document.body.appendChild(main);
    document.body.style = "padding-right: 20%;padding-left: 20%;"

    // 解决图片无法加载问题
    for (const img of document.querySelectorAll("img")) {
        img.src = img.getAttribute("data-original-src");
    }
})();