知乎界面精简

移除不必要信息,方便大屏查看

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         知乎界面精简
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  移除不必要信息,方便大屏查看
// @author       God is a girl
// @match        https://*.zhihu.com/question/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=zhihu.com
// @grant        none
// @license MIT
// ==/UserScript==

(function () {
    'use strict';

    // Your code here...
    function getNode(name) {
        return document.querySelector(name)
    }
    function remove(node) {
        node.parentElement.removeChild(node)
    }

    setTimeout(() => {
        // 去除header
        const node1 = getNode(".QuestionHeader-content")

        // 去除侧边栏
        const node2 = getNode(".Question-sideColumn")

        const node3 = getNode(".Sticky")

        // 去除绑定事件
        const node4 = getNode(".QuestionPage")

        const main = getNode(".Question-mainColumn")

        node1 && remove(node1)
        node2 && remove(node2)
        node3 && remove(node3)

        node4.onclick = function(){}

        main.style.width = '1000px'
    }, 2000)
})();