Remove Google AI Overview

Automatically hides the AI Overview section from Google search pages.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name        Remove Google AI Overview
// @namespace   Violentmonkey Scripts
// @match       https://www.google.com/search*
// @icon        https://www.google.com/s2/favicons?sz=64&domain=google.com
// @grant       none
// @version     1.2
// @author      klaufir216
// @run-at      document-start
// @license     MIT
// @description Automatically hides the AI Overview section from Google search pages.
// ==/UserScript==

function parentUntil(elem, cond) {
  while (elem) {
    if (cond(elem)) return elem;
    elem = elem.parentNode;
  }
  return null;
}

function hideElement(elem) {
  if (elem) {
    elem.style.display='none';
  }
}

function removeAiOverview() {
  hideElement(document.querySelector('div[data-mlros]'));
  hideElement(document.querySelector('div#m-x-content'));
}

setTimeout(removeAiOverview, 100);
setTimeout(removeAiOverview, 200);
setTimeout(removeAiOverview, 300);
setTimeout(removeAiOverview, 400);
setTimeout(removeAiOverview, 600);
setTimeout(removeAiOverview, 800);
setTimeout(removeAiOverview, 1000);
setInterval(removeAiOverview, 1000);