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-15
// @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';
const target = document.body || document;
const observer = new MutationObserver(() => {
const ai_mode = document.querySelector('a[href*="udm=50"]');
const ai_overview = document.querySelector('div[data-mcp]');
ai_mode && ai_overview && ([ai_mode.closest('[role=listitem]'), ai_overview.parentElement].forEach(element => { element.style.display = 'none'; }), observer.disconnect());
});
observer.observe(target, { childList: 1, subtree: 1 });
})();