Remove Google AI Overview

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

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

// ==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/search?*
// @grant         remove ai slop
// @run-at       document-idle
// @deny         ai slop from google
// @namespace https://greasyfork.org/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" link
        const aiModeLink = document.querySelector('a.XVMlrc.nPDzT.T3FoJb[href*="udm=50"]');
        if (aiModeLink) {
            aiModeLink.remove();
            console.log('Removed AI Mode link');
        }
    }

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