Skip to content

Instantly share code, notes, and snippets.

@marioBonales
Created August 28, 2025 14:43
Show Gist options
  • Save marioBonales/7c7db128feacdcf892bb9a0f778a61bc to your computer and use it in GitHub Desktop.
Save marioBonales/7c7db128feacdcf892bb9a0f778a61bc to your computer and use it in GitHub Desktop.
Remove Google AI
// ==UserScript==
// @name Remove AI content from google
// @namespace http://tampermonkey.net/
// @version 2025-08-28
// @description Removes the AI mode option and the AI Overview in Google
// @author Mario Bonales
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @match https://www.google.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=google.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
/* global waitForKeyElements */
waitForKeyElements("[role=list]", () => {
for (const possibleClanker of document.querySelectorAll("span")) {
if(possibleClanker.textContent?.includes("AI Mode")) {
//Remove the clankers
possibleClanker.closest("[role=listitem]").remove()
}
}
})
waitForKeyElements("button", () => {
for (const possibleClanker of document.querySelectorAll("span")) {
if(possibleClanker.textContent?.includes("AI Mode")) {
//Remove the clankers
possibleClanker.closest("button").remove()
}
}
})
waitForKeyElements("h1", () => {
for (const possibleClanker of document.querySelectorAll("h1")) {
console.log({possibleClanker});
if(possibleClanker.textContent?.includes("AI Overview")) {
//Remove the clankers
possibleClanker.parentNode.parentNode.remove()
}
}
})
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment