您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
知乎手机页面优化,自动展开,无APP提示
// ==UserScript== // @name 知乎手机页面优化 // @namespace http://greasyfork.icu/users/439775 // @version 0.3.5 // @description 知乎手机页面优化,自动展开,无APP提示 // @author EricSong // @include http*://www.zhihu.com/question/* // @include http*://*.zhihu.com/p/* // @grant none // ==/UserScript== (function() { 'use strict'; const getModalWrap = () => document.querySelector(".ModalWrap"); const goAway = () => { // 移除遮罩层 getModalWrap().remove(); document.body.classList.remove("ModalWrap-body"); document.body.style.overflow = "auto"; // 展示所有内容 const richContents = document.querySelectorAll('.RichContent'); [...richContents].map(rc => { rc.classList.remove('is-collapsed'); rc.querySelector('.RichContent-inner').style.maxHeight = 'unset'; }); // 回滚至页首 window.scrollTo(0, 0); }; const intervalId = setInterval(() => { // 移除App打开按钮 const openInAppButton = document.querySelector('.OpenInAppButton') openInAppButton && openInAppButton.remove(); const mw = getModalWrap(); if (!mw) return; clearInterval(intervalId); goAway(); }, 500); setTimeout(() => clearInterval(intervalId), 5000); })();