Skip to content

Instantly share code, notes, and snippets.

@bartbroere
Created November 6, 2025 15:00
Show Gist options
  • Select an option

  • Save bartbroere/65c14cdcd337d80fc36e40b02cc303d9 to your computer and use it in GitHub Desktop.

Select an option

Save bartbroere/65c14cdcd337d80fc36e40b02cc303d9 to your computer and use it in GitHub Desktop.
A Tampermonkey userscript to add -noai to Google queries
// ==UserScript==
// @name Add -noai to Google Queries
// @namespace http://tampermonkey.net/
// @version 2025-11-06
// @description Adds -noai to Google search queries
// @author Bart Broere
// @match https://www.google.com/search?q=*
// @icon https://www.google.com/s2/favicons?sz=64&domain=google.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Get the current query string from the URL
const urlParams = new URLSearchParams(document.location.search);
const queryString = urlParams.get('q');
// Check if the -noai parameter is already present in the query string
if (!queryString.includes('-noai')) {
// If not, add it to the query string and redirect to the updated page
const updatedQueryString = `${queryString} -noai`;
urlParams.set('q', updatedQueryString);
document.location.href = `https://www.google.com/search?${urlParams.toString()}`;
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment