Greasy Fork

Greasy Fork is available in English.

Remove Google AI Overview

Removes Google's AI Overview and AI Mode link from search results.

当前为 2025-07-21 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Remove Google AI Overview
// @version      1.5
// @description  Removes Google's AI Overview and AI Mode link from search results.
// @author       Laucs
// @match        https://www.google.com/
// @grant         remove ai slop
// @run-at       document-idle
// @deny         ai slop from google
// @namespace http://greasyfork.icu/users/1483782
// ==/UserScript==

(function () {
    'use strict';

    function removeAIOverviewElements() {
        // Remove AI Overview by jsname
        const jsnameBox = document.querySelector('div[jsname="txosbe"]');
        if (jsnameBox) {
            jsnameBox.remove();
            console.log('Removed AI Overview: jsname="txosbe"');
        }

        // Remove AI Overview by class
        const classBox = document.querySelector('div.YNk70c.EjQTId');
        if (classBox) {
            classBox.remove();
            console.log('Removed AI Overview: class="YNk70c EjQTId"');
        }

        // Remove AI Mode <a> link
        const aiModeLink = document.querySelector('a.XVMlrc.nPDzT.T3FoJb[href*="udm=50"]');
        if (aiModeLink) {
            aiModeLink.remove();
            console.log('Removed AI Mode link');
        }

        // Remove AI Mode <div> container
        const aiModeDivs = document.querySelectorAll('div.YmvwI[jsname="bVqjv"]');
        aiModeDivs.forEach(div => {
            const span = div.querySelector('span.Beswgc');
            if (span && span.textContent.trim() === 'AI Mode') {
                div.remove();
                console.log('Removed AI Mode <div>');
            }
        });

        // Remove AI Mode <button>
        const aiModeButton = document.querySelector('button.plR5qb[jscontroller="jNZDL"][role="link"][type="button"]');
        if (aiModeButton) {
            aiModeButton.remove();
            console.log('Removed AI Mode <button>');
        }
    }

    // Run once and observe changes
    removeAIOverviewElements();
    const observer = new MutationObserver(removeAIOverviewElements);
    observer.observe(document.body, { childList: true, subtree: true });
})();