Greasy Fork is available in English.
Hides AI Mode and AI Overview in Google search results
当前为
// ==UserScript==
// @name No Google AI
// @description Hides AI Mode and AI Overview in Google search results
// @version 2025-10-18
// @author Zeerocss
// @namespace http://greasyfork.icu/en/users/735136-zeerocss
// @license MIT
// @include *://*.google.tld/search*
// @icon https://www.google.com/s2/favicons?sz=64&domain=google.com
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
// As a style by default
document.head.innerHTML += '<style>[role=listitem]:has(a[href*="udm=50"]),*:has(>div[data-mcp]){display:none!important}</style>'
//Fallback (if :has() is not supported in your browser)
const force_fallback = false;
if (force_fallback || !(typeof CSS !== "undefined" && typeof CSS.supports === "function" && CSS.supports("selector(:has(*))"))){
document.addEventListener('DOMContentLoaded', () => {
const ai_mode = document.querySelector('a[href*="udm=50"]');
const ai_overview = document.querySelector('div[data-mcp]');
([ai_mode && ai_mode.closest('[role=listitem]'), ai_overview && ai_overview.parentElement]).forEach(el => el && (el.style.display = 'none'));
});
}
})();