Better ZhiHu

Better ZhiHu view

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

Advertisement:

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Advertisement:

// ==UserScript==
// @name         Better ZhiHu
// @version      1.1
// @description  Better ZhiHu view
// @author       Aiello Chan
// @namespace aiellochan.com
// @match           *://www.zhihu.com/question/*
// @match			*://www.zhihu.com/search*
// @match			*://www.zhihu.com/hot
// @match			*://www.zhihu.com/follow
// @match			*://www.zhihu.com/
// @match           *://www.zhihu.com/signin*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    const styleNode = document.createElement("style")

    setTimeout(function(){document.title = "知乎"}, 3e3)

    let cssFix = ""
    cssFix += ".Question-mainColumn{width:auto;}" // 答案页全宽
    cssFix += "header,.Question-sideColumn--sticky{display:none !important;}" // 去掉浮动头部
    cssFix += 'html{overflow:auto !important;} .Modal-backdrop,.signFlowModal{display:none !important;}' // 干掉登陆提示

    styleNode.innerText = cssFix
    document.body.append(styleNode)
})();