您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
在百度、Bing、谷歌中屏蔽CSDN搜索结果 / Hide CSDN results on search engines (Baidu, Bing, Google)
// ==UserScript== // @name 屏蔽CSDN搜索结果 / Hide CSDN Search Results // @namespace https://github.com/uuhc // @version 1.0 // @description 在百度、Bing、谷歌中屏蔽CSDN搜索结果 / Hide CSDN results on search engines (Baidu, Bing, Google) // @author uuhc // @match *://www.baidu.com/s* // @match *://www.google.com/search* // @match *://www.bing.com/search* // @grant none // ==/UserScript== (function() { 'use strict'; // Function to hide results based on domain function hideCSDNResults() { const csdnKeywords = /csdn\.net/i; // Baidu if (location.host.includes("baidu.com")) { document.querySelectorAll('.c-container').forEach((result) => { if (result.innerText.match(csdnKeywords)) { result.style.display = 'none'; } }); } // Google else if (location.host.includes("google.com")) { document.querySelectorAll('.g').forEach((result) => { if (result.innerText.match(csdnKeywords)) { result.style.display = 'none'; } }); } // Bing else if (location.host.includes("bing.com")) { document.querySelectorAll('.b_algo').forEach((result) => { if (result.innerText.match(csdnKeywords)) { result.style.display = 'none'; } }); } } // Run the function initially and on dynamically loaded content hideCSDNResults(); document.addEventListener('scroll', hideCSDNResults); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址