zhi-hu

知知乎乎(收藏夹双列;隐藏视频回答;)

当前为 2022-03-07 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         zhi-hu
// @namespace    https://greasyfork.org/zh-CN/scripts/438709-zhi-hu
// @version      0.0.3
// @description  知知乎乎(收藏夹双列;隐藏视频回答;)
// @author       Song
// @match        *://www.zhihu.com/*
// @license MIT
// @grant        none
// ==/UserScript==
(function () {
    /**
     * 插入样式表
     */
    function insertCSS() {
        let styleSheet = document.styleSheets[document.styleSheets.length - 1];
        /*收藏栏的样式,变成双列*/
        styleSheet.insertRule('.Modal--large.FavlistsModal {width: 600px;}');
        styleSheet.insertRule('.Favlists-content .Favlists-item {width: 230px; float: left;}');
        styleSheet.insertRule(' .Favlists-content .Favlists-item:nth-child(even){margin-left: 60px;}');
		
		/*隐藏视频回答*/
		styleSheet.insertRule('.VideoAnswerPlayer .VideoAnswerPlayer-video {height: 0px;}');
        styleSheet.insertRule('.ZVideoItem  {height: 2px;}');
    }

    insertCSS();
})();