知乎界面精简

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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)
})();