您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
去除网页元素,classname格式:.+classname,元素格式:#+元素名
当前为
// ==UserScript== // @name 综合去除或隐藏网页元素 // @version 1.0 // @description 去除网页元素,classname格式:.+classname,元素格式:#+元素名 // @author Geek // @match https://*.ghxi.com/* // @match https://*.bilibili.com/* // @match https://*.123pan.com/* // @match https://*.bing.com/* // @match https://yiyan.baidu.com/ // @license MIT // @run-at docunment-start // @namespace https://gf.qytechs.cn/users/1318945 // ==/UserScript== (function () { // 只需要在此处定义需要隐藏元素 var clearElementArr = [ {"ghxi.com":[".item-sticky",".wwads-cn",".wwads-vertical",".wpcom_ad_wrap","."]}, {"bilibili.com": [".loc-entry",".left-loc-entry","跨年晚会", ".download-entry",".download-client-trigger",".desktop-download-tip","客户端下载", ".bili-dyn-version-control", ".adblock-tips", ".vip-wrap", ".slide-ad-exp", ".vip-entry-containter", ".inside-wrp",]}, {"123pan.com": [".mfy-main-layout__head", ".sider-member-btn", ".vip-icon", ".banner_all_wrap", ".ant-menu-submenu-inline", ".ant-menu-submenu",]}, {"https://yiyan.baidu.com": [".CWqnDmBt",".B1u21v2t",".Pek2kYSK",".PB57KCF0",".NQlBLxO4",".gLMZvZ80",".RxwtDmpH", ]} ] // 这是架子代码,不用改动 console.log("准备隐藏以下元素 >>> " + clearElementArr); let style = document.createElement("style"); window.location.href.includes("zhihu.com/question/") ? style.innerText += `html {overflow: auto}` : ''; window.pageC = function (clearElements) { if (typeof (clearElements) === "object") { clearElementArr.forEach(o => { let key = Object.keys(o); if (window.location.href.includes(key)) { o[key].forEach(el => { style.innerText += `${el} {display: none !important;} `; }) } }) } else { console.error("param error,require array!"); } style.innerText != '' ? document.head.appendChild(style) : ''; }; pageC(clearElementArr); // console.log("清理完成!"); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址