Greasy Fork

千图网隐藏搜索页企业专享

避免不需要使用企业素材的用户看到不需要的资源

目前为 2022-09-07 提交的版本。查看 最新版本

// ==UserScript==
// @name         千图网隐藏搜索页企业专享
// @namespace    https://www.52pojie.cn/home.php?mod=space&uid=508077
// @version      1.21
// @description  避免不需要使用企业素材的用户看到不需要的资源
// @author       未知的动力
// @match        *://www.58pic.com/*
// @run-at      document-end
// @license     GPL
// ==/UserScript==

!function(){const t=new class{constructor(t,o,e=null,n="childList"){this.ele=t,this.callback=o,this.config=null==e?{attributes:!0,childList:!0,subtree:!0}:e,this.monitorType=n}startMonitor(){let t=this;let o=new MutationObserver((function(o,e){for(let e of o)e.type==t.monitorType&&t.callback()}));o.observe(t.ele,t.config),t._monitorHandle=o}stopMonitor(){this._monitorHandle.disconnect()}}(document.body,(function(){const o=document.querySelectorAll(".qtd-card");if(null!=o){t.stopMonitor();for(let t=0;t<o.length;t++){const e=o[t].querySelector("em")?.textContent.indexOf("企业专享");-1!=e&&o[t].remove()}}}));t.startMonitor()}();