知乎手机页面优化

知乎手机页面优化,自动展开,无APP提示

As of 2020-09-26. See the latest version.

// ==UserScript==
// @name         知乎手机页面优化
// @namespace    https://greasyforks.org/users/439775
// @version      0.3
// @description  知乎手机页面优化,自动展开,无APP提示
// @author       EricSong
// @include      http*://www.zhihu.com/question/*
// @include      http*://*.zhihu.com/p/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // 移除遮罩层
    document.querySelector(".ModalWrap").remove();
    document.body.classList.remove("ModalWrap-body");
    document.body.style.overflow = "auto";

    // 展示内容
    document.querySelector('.RichContent').classList.remove('is-collapsed');
    document.querySelector('.RichContent-inner').style.maxHeight = 'unset';

    // 移除App打开按钮
    document.querySelector('.OpenInAppButton').remove();

    // 回滚至页首
    document.scrollTo(0, 0);
})();
长期地址
遇到问题?请前往 GitHub 提 Issues。