您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
移除知乎 App 下载,自动取消下载提示
当前为
// ==UserScript== // @name 手机版移除知乎 App 下载 // @namespace http://tampermonkey.net/ // @version 0.3.1 // @description 移除知乎 App 下载,自动取消下载提示 // @author sl00p // @match https://www.zhihu.com/* // @grant none // @run-at document-end // ==/UserScript== (function() { 'use strict'; let autoClickBrowser = function() { let btnList = ["ModalWrap-itemBtn", "ModalButtonGroup ModalButtonGroup--horizontal"]; for(let idx = 0; idx < btnList.length; ++idx) { let btn = document.getElementsByClassName(btnList[idx]); if(btn && btn.length > 1 && window.location.pathname !== "/") { btn[1].click(); } } }; let autoClickReader = function() { let btnList = ["Button ContentItem-rightButton ContentItem-expandButton Button--plain"]; for(let idx = 0; idx < btnList.length; ++idx) { let btn = document.getElementsByClassName(btnList[idx]); if(btn && btn.length > 0 && window.location.pathname !== "/") { btn[0].click(); } } }; let removeAds = function() { let funList = ["Card DownloadGuide DownloadGuide-block", "DownloadGuide-inner", "Card DownloadGuide DownloadGuide-block DownloadGuide-block--active", "Card ViewAllInappCard", "OpenInAppButton OpenInApp is-shown", "Button Button--primary Button--blue", "Card TopstoryItem TopstoryItem--advertCard", "MBannerAd"]; for(let idx = 0; idx < funList.length; ++idx) { let nodes = document.getElementsByClassName(funList[idx]); for(let jdx = 0; jdx < nodes.length; ++jdx) { if(nodes[jdx] !== undefined) { nodes[jdx].remove(); } } } }; let inter = setInterval(function() { if(window.location.href.indexOf("oia") > 0) { window.history.back() } let mainApp = document.getElementsByClassName("MobileAppHeader-downloadLink"); for(let idx = 0; idx < mainApp.length; ++idx) { mainApp[idx].href = ""; mainApp[idx].innerText = "不上知乎?"; } removeAds(); autoClickBrowser(); autoClickReader(); }, 500); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址