您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
知乎移动端修复:阻止跳转,自动展开
// ==UserScript== // @name 知乎移动端修复 // @version 1.0.2 // @description 知乎移动端修复:阻止跳转,自动展开 // @author Allan Chain // @homepage https://github.com/AllanChain/zhihu-mobile // @namespace https://github.com/AllanChain/ // @icon https://static.zhihu.com/heifetz/favicon.ico // @include https://www.zhihu.com/* // @include https://zhuanlan.zhihu.com/* // @grant GM_addStyle // @run-at document-start // ==/UserScript== // src/style.css var style_default = ".DownloadGuide {\n display: none;\n}\n.OpenInAppButton {\n display: none;\n}\n.MobileAppHeader-downloadLink {\n display: none;\n}\n.ModalWrap {\n display: none;\n}\nhtml, body.ModalWrap-body {\n overflow: auto !important;\n}\n.ContentItem-expandButton {\n display: none;\n}\n.RichContent-inner {\n max-height: unset !important;\n}\n"; // src/index.js function expandRichContent(node) { node.classList.remove("is-collapsed"); } function expandRichContentRecursive(node) { node.querySelectorAll(".RichContent.is-collapsed").forEach(expandRichContent); } console.log("\u77E5\u4E4E\u79FB\u52A8\u7AEF\u4FEE\u590D\u6B63\u5728\u8FD0\u884C"); GM_addStyle(style_default); var observer = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target.classList.contains("RichContent") && m.target.classList.contains("is-collapsed")) { expandRichContent(m.target); } else { for (const node in m.addedNodes) { if (node.nodeType === Node.ELEMENT_NODE && node.classList.contains("RichContent")) { expandRichContent(node); } } } } }); window.addEventListener("load", function(event) { event.stopImmediatePropagation(); expandRichContentRecursive(document); observer.observe(document.documentElement, { childList: true, subtree: true }); }); document.addEventListener("click", (event) => { if (event.target.tagName !== "BUTTON") { event.stopImmediatePropagation(); } }, false);
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址