Skip to content

Instantly share code, notes, and snippets.

@DuckersMcQuack
Last active June 21, 2025 14:35
Show Gist options
  • Save DuckersMcQuack/30f77e430b89a028f9c255fd9b4ec079 to your computer and use it in GitHub Desktop.
Save DuckersMcQuack/30f77e430b89a028f9c255fd9b4ec079 to your computer and use it in GitHub Desktop.
removes unwanted or brings back wanted tabs from google search results to only have tabs that matters.

Google tab remover scripts.

These userscripts removes the buttons of choice in Google Search results, making your google search cleaner with less unwanted clutter.

Removes the books, finances, news, short videos, and web tab buttons next to the "All" tab in Google Search
Works across multiple Google domains (.com, .co.uk, .nl, .de, .fr, and so on)
Automatically updates when using Google's dynamic search
Maintains button presence during navigation
Clean integration with Google's native UI

Installation

Install a userscript manager:
    Tampermonkey (Recommended)
    Greasemonkey
    Violentmonkey

Install the script:

Create a new script in your userscript manager and copy the contents of whichever tabs you want removed.

books_tab_remover.js

finances_tab_remover.js

news_tab_remover.js

short_videos_remover.js

web_tab_remover.js

Or if you want to bring back tabs

restore_products_tab.js

restore_shopping_tab.js

restore_maps_tab.js

restore_maps_tab_after_videos.js If you want maps tab to show to the right of videos tab.

Usage

Perform a search on Google
The Short Videos button will disappear automatically in the navigation bar

Supported Domains

google.com  
google.co.uk  
google.ca  
google.com.au  
google.co.in  
google.co.jp  
google.de  
google.fr  
google.nl  
google.it  
google.es  
google.com.br  
google.com.mx  
google.ru  
google.co.kr  
google.com.tr  
google.pl  
google.se  
google.no  
google.fi  
google.dk  
google.be  
google.pt  
google.gr  
google.cz  
google.hu  
google.sk  
google.ro  
google.bg  
google.com.eg  
google.co.za  
google.com.sg  
google.com.hk  
google.co.id  
google.co.th  
google.com.vn  
google.com.ph  
google.com.my  
google.tld  

Other Google domains should work as well

Debug Mode

The script includes a debug mode that logs operations to the browser console:

Open browser DevTools (F12)
Go to Console tab
Look for messages prefixed with [Remove Short Videos Tab]

To disable debug logging, set DEBUG = false in the script.

Borrowed readme and code GPT altered from https://gist.github.com/Daan-Grashoff as it's his script i had the remover based on.

// ==UserScript==
// @name Remove Books Tab on Google
// @namespace http://tampermonkey.net/
// @version 2025-06-21
// @description Removes the "Books" tab from Google search results across all major Google domains and regions.
// @author Modified by ChatGPT
// @match *://*.google.com/search*
// @match *://*.google.co.uk/search*
// @match *://*.google.ca/search*
// @match *://*.google.com.au/search*
// @match *://*.google.co.in/search*
// @match *://*.google.co.jp/search*
// @match *://*.google.de/search*
// @match *://*.google.fr/search*
// @match *://*.google.nl/search*
// @match *://*.google.it/search*
// @match *://*.google.es/search*
// @match *://*.google.com.br/search*
// @match *://*.google.com.mx/search*
// @match *://*.google.ru/search*
// @match *://*.google.co.kr/search*
// @match *://*.google.com.tr/search*
// @match *://*.google.pl/search*
// @match *://*.google.se/search*
// @match *://*.google.no/search*
// @match *://*.google.fi/search*
// @match *://*.google.dk/search*
// @match *://*.google.be/search*
// @match *://*.google.pt/search*
// @match *://*.google.gr/search*
// @match *://*.google.cz/search*
// @match *://*.google.hu/search*
// @match *://*.google.sk/search*
// @match *://*.google.ro/search*
// @match *://*.google.bg/search*
// @match *://*.google.com.eg/search*
// @match *://*.google.co.za/search*
// @match *://*.google.com.sg/search*
// @match *://*.google.com.hk/search*
// @match *://*.google.co.id/search*
// @match *://*.google.co.th/search*
// @match *://*.google.com.vn/search*
// @match *://*.google.com.ph/search*
// @match *://*.google.com.my/search*
// @match *://*.google.tld/search*
// @run-at document-idle
// @grant none
// ==/UserScript==
(function() {
'use strict';
const DEBUG = true;
function log(...args) {
if (DEBUG) console.log('[Remove Books Tab]', ...args);
}
function removeBooksTab() {
const possibleContainers = [
document.querySelector('div[role="navigation"] div[role="list"]'),
document.querySelector('.MUFPAc'),
document.querySelector('.nfdoRb'),
document.querySelector('.T47uwc'),
document.querySelector('.NZmxZe'),
document.querySelector('.crJ18e')
];
const tabsContainer = possibleContainers.find(el => el !== null);
if (!tabsContainer) {
log('Navigation tabs container not found.');
return;
}
const tabs = tabsContainer.querySelectorAll('[role="listitem"], a');
tabs.forEach(tab => {
const text = tab.textContent?.toLowerCase();
if (text && text.includes('books')) {
log('Removing tab:', text);
tab.closest('[role="listitem"]')?.remove();
}
});
}
// Initial load
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', removeBooksTab);
} else {
removeBooksTab();
}
// Watch for dynamic page changes
let lastUrl = location.href;
const observer = new MutationObserver(() => {
const currentUrl = location.href;
if (currentUrl !== lastUrl) {
lastUrl = currentUrl;
setTimeout(removeBooksTab, 100);
}
});
observer.observe(document, { subtree: true, childList: true });
// Periodic backup check
setInterval(removeBooksTab, 2000);
})();
// ==UserScript==
// @name Remove Finance Tab on Google
// @namespace http://tampermonkey.net/
// @version 2025-06-21
// @description Removes the "Finance" tab from Google search results globally across all domains and regions.
// @author Modified by ChatGPT
// @match *://*.google.com/search*
// @match *://*.google.co.uk/search*
// @match *://*.google.ca/search*
// @match *://*.google.com.au/search*
// @match *://*.google.co.in/search*
// @match *://*.google.co.jp/search*
// @match *://*.google.de/search*
// @match *://*.google.fr/search*
// @match *://*.google.nl/search*
// @match *://*.google.it/search*
// @match *://*.google.es/search*
// @match *://*.google.com.br/search*
// @match *://*.google.com.mx/search*
// @match *://*.google.ru/search*
// @match *://*.google.co.kr/search*
// @match *://*.google.com.tr/search*
// @match *://*.google.pl/search*
// @match *://*.google.se/search*
// @match *://*.google.no/search*
// @match *://*.google.fi/search*
// @match *://*.google.dk/search*
// @match *://*.google.be/search*
// @match *://*.google.pt/search*
// @match *://*.google.gr/search*
// @match *://*.google.cz/search*
// @match *://*.google.hu/search*
// @match *://*.google.sk/search*
// @match *://*.google.ro/search*
// @match *://*.google.bg/search*
// @match *://*.google.com.eg/search*
// @match *://*.google.co.za/search*
// @match *://*.google.com.sg/search*
// @match *://*.google.com.hk/search*
// @match *://*.google.co.id/search*
// @match *://*.google.co.th/search*
// @match *://*.google.com.vn/search*
// @match *://*.google.com.ph/search*
// @match *://*.google.com.my/search*
// @match *://*.google.tld/search*
// @run-at document-idle
// @grant none
// ==/UserScript==
(function() {
'use strict';
const DEBUG = true;
function log(...args) {
if (DEBUG) console.log('[Remove Finance Tab]', ...args);
}
function removeFinanceTab() {
const possibleContainers = [
document.querySelector('div[role="navigation"] div[role="list"]'),
document.querySelector('.MUFPAc'),
document.querySelector('.nfdoRb'),
document.querySelector('.T47uwc'),
document.querySelector('.NZmxZe'),
document.querySelector('.crJ18e')
];
const tabsContainer = possibleContainers.find(el => el !== null);
if (!tabsContainer) {
log('Navigation tabs container not found.');
return;
}
const tabs = tabsContainer.querySelectorAll('[role="listitem"], a');
tabs.forEach(tab => {
const text = tab.textContent?.toLowerCase();
if (text && text.includes('finance')) {
log('Removing tab:', text);
tab.closest('[role="listitem"]')?.remove();
}
});
}
// Initial load
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', removeFinanceTab);
} else {
removeFinanceTab();
}
// Watch for dynamic page changes
let lastUrl = location.href;
const observer = new MutationObserver(() => {
const currentUrl = location.href;
if (currentUrl !== lastUrl) {
lastUrl = currentUrl;
setTimeout(removeFinanceTab, 100);
}
});
observer.observe(document, { subtree: true, childList: true });
// Periodic backup check
setInterval(removeFinanceTab, 2000);
})();
// ==UserScript==
// @name Remove News Tab on Google
// @namespace http://tampermonkey.net/
// @version 2025-06-21
// @description Removes the "News" tab from Google search results across all major Google domains and regions.
// @author Modified by ChatGPT
// @match *://*.google.com/search*
// @match *://*.google.co.uk/search*
// @match *://*.google.ca/search*
// @match *://*.google.com.au/search*
// @match *://*.google.co.in/search*
// @match *://*.google.co.jp/search*
// @match *://*.google.de/search*
// @match *://*.google.fr/search*
// @match *://*.google.nl/search*
// @match *://*.google.it/search*
// @match *://*.google.es/search*
// @match *://*.google.com.br/search*
// @match *://*.google.com.mx/search*
// @match *://*.google.ru/search*
// @match *://*.google.co.kr/search*
// @match *://*.google.com.tr/search*
// @match *://*.google.pl/search*
// @match *://*.google.se/search*
// @match *://*.google.no/search*
// @match *://*.google.fi/search*
// @match *://*.google.dk/search*
// @match *://*.google.be/search*
// @match *://*.google.pt/search*
// @match *://*.google.gr/search*
// @match *://*.google.cz/search*
// @match *://*.google.hu/search*
// @match *://*.google.sk/search*
// @match *://*.google.ro/search*
// @match *://*.google.bg/search*
// @match *://*.google.com.eg/search*
// @match *://*.google.co.za/search*
// @match *://*.google.com.sg/search*
// @match *://*.google.com.hk/search*
// @match *://*.google.co.id/search*
// @match *://*.google.co.th/search*
// @match *://*.google.com.vn/search*
// @match *://*.google.com.ph/search*
// @match *://*.google.com.my/search*
// @match *://*.google.tld/search*
// @run-at document-idle
// @grant none
// ==/UserScript==
(function() {
'use strict';
const DEBUG = true;
function log(...args) {
if (DEBUG) console.log('[Remove News Tab]', ...args);
}
function removeNewsTab() {
const possibleContainers = [
document.querySelector('div[role="navigation"] div[role="list"]'),
document.querySelector('.MUFPAc'),
document.querySelector('.nfdoRb'),
document.querySelector('.T47uwc'),
document.querySelector('.NZmxZe'),
document.querySelector('.crJ18e')
];
const tabsContainer = possibleContainers.find(el => el !== null);
if (!tabsContainer) {
log('Navigation tabs container not found.');
return;
}
const tabs = tabsContainer.querySelectorAll('[role="listitem"], a');
tabs.forEach(tab => {
const text = tab.textContent?.toLowerCase();
if (text && text.includes('news')) {
log('Removing tab:', text);
tab.closest('[role="listitem"]')?.remove();
}
});
}
// Initial load
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', removeNewsTab);
} else {
removeNewsTab();
}
// Watch for dynamic page changes
let lastUrl = location.href;
const observer = new MutationObserver(() => {
const currentUrl = location.href;
if (currentUrl !== lastUrl) {
lastUrl = currentUrl;
setTimeout(removeNewsTab, 100);
}
});
observer.observe(document, { subtree: true, childList: true });
// Periodic backup check
setInterval(removeNewsTab, 2000);
})();
// ==UserScript==
// @name Restore Maps Tab on Google (After Videos)
// @namespace http://tampermonkey.net/
// @version 2025-06-21
// @description Adds a "Maps" tab to Google Search results, positioned right after the "Videos" tab if present. Works across all major Google domains and updates dynamically with SPA support.
// @author ChatGPT
// @match *://*.google.com/search*
// @match *://*.google.co.uk/search*
// @match *://*.google.ca/search*
// @match *://*.google.com.au/search*
// @match *://*.google.co.in/search*
// @match *://*.google.co.jp/search*
// @match *://*.google.de/search*
// @match *://*.google.fr/search*
// @match *://*.google.nl/search*
// @match *://*.google.it/search*
// @match *://*.google.es/search*
// @match *://*.google.com.br/search*
// @match *://*.google.com.mx/search*
// @match *://*.google.ru/search*
// @match *://*.google.co.kr/search*
// @match *://*.google.com.tr/search*
// @match *://*.google.pl/search*
// @match *://*.google.se/search*
// @match *://*.google.no/search*
// @match *://*.google.fi/search*
// @match *://*.google.dk/search*
// @match *://*.google.be/search*
// @match *://*.google.pt/search*
// @match *://*.google.gr/search*
// @match *://*.google.cz/search*
// @match *://*.google.hu/search*
// @match *://*.google.sk/search*
// @match *://*.google.ro/search*
// @match *://*.google.bg/search*
// @match *://*.google.com.eg/search*
// @match *://*.google.co.za/search*
// @match *://*.google.com.sg/search*
// @match *://*.google.com.hk/search*
// @match *://*.google.co.id/search*
// @match *://*.google.co.th/search*
// @match *://*.google.com.vn/search*
// @match *://*.google.com.ph/search*
// @match *://*.google.com.my/search*
// @match *://*.google.tld/search*
// @run-at document-idle
// @grant none
// ==/UserScript==
(function () {
'use strict';
const DEBUG = true;
function log(...args) {
if (DEBUG) console.log('[Restore Maps Tab]', ...args);
}
function restoreMapsTab() {
const possibleContainers = [
document.querySelector('div[role="navigation"] div[role="list"]'),
document.querySelector('.MUFPAc'),
document.querySelector('.nfdoRb'),
document.querySelector('.T47uwc'),
document.querySelector('.NZmxZe'),
document.querySelector('.crJ18e')
];
const tabsContainer = possibleContainers.find(el => el !== null);
if (!tabsContainer) {
log('Navigation tabs container not found');
return;
}
if (tabsContainer.querySelector('.maps-button-custom')) {
return; // Already added
}
const searchQuery = new URLSearchParams(window.location.search).get('q');
if (!searchQuery) {
log('No search query found.');
return;
}
// Create Maps tab
const listItem = document.createElement('div');
listItem.setAttribute('role', 'listitem');
listItem.classList.add('maps-button-custom');
const link = document.createElement('a');
link.classList.add('nPDzT', 'T3FoJb');
link.href = `https://www.google.com/maps/search/${encodeURIComponent(searchQuery)}`;
const text = document.createElement('div');
text.classList.add('YmvwI');
text.textContent = 'Maps';
link.appendChild(text);
listItem.appendChild(link);
// Find "Videos" tab and insert after
const allTabs = tabsContainer.querySelectorAll('[role="listitem"]');
let inserted = false;
for (const tab of allTabs) {
const label = tab.textContent?.trim().toLowerCase();
if (label === 'videos') {
log('Inserting Maps tab after Videos');
if (tab.nextSibling) {
tabsContainer.insertBefore(listItem, tab.nextSibling);
} else {
tabsContainer.appendChild(listItem);
}
inserted = true;
break;
}
}
if (!inserted) {
log('Videos tab not found — appending Maps tab at end');
tabsContainer.appendChild(listItem);
}
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', restoreMapsTab);
} else {
restoreMapsTab();
}
let lastUrl = location.href;
const observer = new MutationObserver(() => {
const currentUrl = location.href;
if (currentUrl !== lastUrl) {
lastUrl = currentUrl;
setTimeout(restoreMapsTab, 100);
}
});
observer.observe(document, { subtree: true, childList: true });
setInterval(restoreMapsTab, 2000);
})();
// ==UserScript==
// @name Restore Maps Tab on Google (After Videos) if you want it after videos.
// @namespace http://tampermonkey.net/
// @version 2025-06-21
// @description Adds a "Maps" tab to Google Search results, positioned right after the "Videos" tab if present. Works across all major Google domains and updates dynamically with SPA support.
// @author ChatGPT
// @match *://*.google.com/search*
// @match *://*.google.co.uk/search*
// @match *://*.google.ca/search*
// @match *://*.google.com.au/search*
// @match *://*.google.co.in/search*
// @match *://*.google.co.jp/search*
// @match *://*.google.de/search*
// @match *://*.google.fr/search*
// @match *://*.google.nl/search*
// @match *://*.google.it/search*
// @match *://*.google.es/search*
// @match *://*.google.com.br/search*
// @match *://*.google.com.mx/search*
// @match *://*.google.ru/search*
// @match *://*.google.co.kr/search*
// @match *://*.google.com.tr/search*
// @match *://*.google.pl/search*
// @match *://*.google.se/search*
// @match *://*.google.no/search*
// @match *://*.google.fi/search*
// @match *://*.google.dk/search*
// @match *://*.google.be/search*
// @match *://*.google.pt/search*
// @match *://*.google.gr/search*
// @match *://*.google.cz/search*
// @match *://*.google.hu/search*
// @match *://*.google.sk/search*
// @match *://*.google.ro/search*
// @match *://*.google.bg/search*
// @match *://*.google.com.eg/search*
// @match *://*.google.co.za/search*
// @match *://*.google.com.sg/search*
// @match *://*.google.com.hk/search*
// @match *://*.google.co.id/search*
// @match *://*.google.co.th/search*
// @match *://*.google.com.vn/search*
// @match *://*.google.com.ph/search*
// @match *://*.google.com.my/search*
// @match *://*.google.tld/search*
// @run-at document-idle
// @grant none
// ==/UserScript==
(function () {
'use strict';
const DEBUG = true;
function log(...args) {
if (DEBUG) console.log('[Restore Maps Tab]', ...args);
}
function restoreMapsTab() {
const possibleContainers = [
document.querySelector('div[role="navigation"] div[role="list"]'),
document.querySelector('.MUFPAc'),
document.querySelector('.nfdoRb'),
document.querySelector('.T47uwc'),
document.querySelector('.NZmxZe'),
document.querySelector('.crJ18e')
];
const tabsContainer = possibleContainers.find(el => el !== null);
if (!tabsContainer) {
log('Navigation tabs container not found');
return;
}
if (tabsContainer.querySelector('.maps-button-custom')) {
return; // Already added
}
const searchQuery = new URLSearchParams(window.location.search).get('q');
if (!searchQuery) {
log('No search query found.');
return;
}
// Create Maps tab
const listItem = document.createElement('div');
listItem.setAttribute('role', 'listitem');
listItem.classList.add('maps-button-custom');
const link = document.createElement('a');
link.classList.add('nPDzT', 'T3FoJb');
link.href = `https://www.google.com/maps/search/${encodeURIComponent(searchQuery)}`;
const text = document.createElement('div');
text.classList.add('YmvwI');
text.textContent = 'Maps';
link.appendChild(text);
listItem.appendChild(link);
// Find "Videos" tab and insert after
const allTabs = tabsContainer.querySelectorAll('[role="listitem"]');
let inserted = false;
for (const tab of allTabs) {
const label = tab.textContent?.trim().toLowerCase();
if (label === 'videos') {
log('Inserting Maps tab after Videos');
if (tab.nextSibling) {
tabsContainer.insertBefore(listItem, tab.nextSibling);
} else {
tabsContainer.appendChild(listItem);
}
inserted = true;
break;
}
}
if (!inserted) {
log('Videos tab not found — appending Maps tab at end');
tabsContainer.appendChild(listItem);
}
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', restoreMapsTab);
} else {
restoreMapsTab();
}
let lastUrl = location.href;
const observer = new MutationObserver(() => {
const currentUrl = location.href;
if (currentUrl !== lastUrl) {
lastUrl = currentUrl;
setTimeout(restoreMapsTab, 100);
}
});
observer.observe(document, { subtree: true, childList: true });
setInterval(restoreMapsTab, 2000);
})();
// ==UserScript==
// @name Restore Products Tab on Google
// @namespace http://tampermonkey.net/
// @version 2025-06-21
// @description Adds a "Products" tab to Google Search results that links to Google Shopping. Works across major Google domains and reappears dynamically after navigation changes (SPA support). Positioned after "Videos" if present, or at the end otherwise.
// @author ChatGPT
// @match *://*.google.com/search*
// @match *://*.google.co.uk/search*
// @match *://*.google.ca/search*
// @match *://*.google.com.au/search*
// @match *://*.google.co.in/search*
// @match *://*.google.co.jp/search*
// @match *://*.google.de/search*
// @match *://*.google.fr/search*
// @match *://*.google.nl/search*
// @match *://*.google.it/search*
// @match *://*.google.es/search*
// @match *://*.google.com.br/search*
// @match *://*.google.com.mx/search*
// @match *://*.google.ru/search*
// @match *://*.google.co.kr/search*
// @match *://*.google.com.tr/search*
// @match *://*.google.pl/search*
// @match *://*.google.se/search*
// @match *://*.google.no/search*
// @match *://*.google.fi/search*
// @match *://*.google.dk/search*
// @match *://*.google.be/search*
// @match *://*.google.pt/search*
// @match *://*.google.gr/search*
// @match *://*.google.cz/search*
// @match *://*.google.hu/search*
// @match *://*.google.sk/search*
// @match *://*.google.ro/search*
// @match *://*.google.bg/search*
// @match *://*.google.com.eg/search*
// @match *://*.google.co.za/search*
// @match *://*.google.com.sg/search*
// @match *://*.google.com.hk/search*
// @match *://*.google.co.id/search*
// @match *://*.google.co.th/search*
// @match *://*.google.com.vn/search*
// @match *://*.google.com.ph/search*
// @match *://*.google.com.my/search*
// @match *://*.google.tld/search*
// @run-at document-idle
// @grant none
// ==/UserScript==
(function () {
'use strict';
const DEBUG = true;
function log(...args) {
if (DEBUG) console.log('[Restore Products Tab]', ...args);
}
function restoreProductsTab() {
const possibleContainers = [
document.querySelector('div[role="navigation"] div[role="list"]'),
document.querySelector('.MUFPAc'),
document.querySelector('.nfdoRb'),
document.querySelector('.T47uwc'),
document.querySelector('.NZmxZe'),
document.querySelector('.crJ18e')
];
const tabsContainer = possibleContainers.find(el => el !== null);
if (!tabsContainer) {
log('No tab container found.');
return;
}
if (tabsContainer.querySelector('.products-button-custom')) {
return; // Already added
}
const searchQuery = new URLSearchParams(window.location.search).get('q');
if (!searchQuery) {
log('No search query found.');
return;
}
// Create the Products tab
const listItem = document.createElement('div');
listItem.setAttribute('role', 'listitem');
listItem.classList.add('products-button-custom');
const link = document.createElement('a');
link.classList.add('nPDzT', 'T3FoJb');
link.href = `https://www.google.com/search?tbm=shop&q=${encodeURIComponent(searchQuery)}`;
const text = document.createElement('div');
text.classList.add('YmvwI');
text.textContent = 'Products';
link.appendChild(text);
listItem.appendChild(link);
// Insert after "Videos" if found, otherwise at end
const tabNodes = tabsContainer.querySelectorAll('[role="listitem"]');
let inserted = false;
for (const tab of tabNodes) {
const label = tab.textContent?.trim().toLowerCase();
if (label === 'videos') {
log('Inserting Products tab after Videos');
if (tab.nextSibling) {
tabsContainer.insertBefore(listItem, tab.nextSibling);
} else {
tabsContainer.appendChild(listItem);
}
inserted = true;
break;
}
}
if (!inserted) {
log('Videos tab not found, appending Products tab at end');
tabsContainer.appendChild(listItem);
}
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', restoreProductsTab);
} else {
restoreProductsTab();
}
let lastUrl = location.href;
const observer = new MutationObserver(() => {
const currentUrl = location.href;
if (currentUrl !== lastUrl) {
lastUrl = currentUrl;
setTimeout(restoreProductsTab, 100);
}
});
observer.observe(document, { subtree: true, childList: true });
setInterval(restoreProductsTab, 2000);
})();
// ==UserScript==
// @name Restore Shopping Tab on Google
// @namespace http://tampermonkey.net/
// @version 2025-06-21
// @description Adds a "Shopping" tab to Google Search results that links to Google Shopping (`tbm=shop`). Simple and lightweight, no other UI changes, and reappears after dynamic page loads (SPA support). Positioned at the end if not otherwise specified by Google UI order.
// @author ChatGPT
// @match *://*.google.com/search*
// @match *://*.google.co.uk/search*
// @match *://*.google.ca/search*
// @match *://*.google.com.au/search*
// @match *://*.google.co.in/search*
// @match *://*.google.co.jp/search*
// @match *://*.google.de/search*
// @match *://*.google.fr/search*
// @match *://*.google.nl/search*
// @match *://*.google.it/search*
// @match *://*.google.es/search*
// @match *://*.google.com.br/search*
// @match *://*.google.com.mx/search*
// @match *://*.google.ru/search*
// @match *://*.google.co.kr/search*
// @match *://*.google.com.tr/search*
// @match *://*.google.pl/search*
// @match *://*.google.se/search*
// @match *://*.google.no/search*
// @match *://*.google.fi/search*
// @match *://*.google.dk/search*
// @match *://*.google.be/search*
// @match *://*.google.pt/search*
// @match *://*.google.gr/search*
// @match *://*.google.cz/search*
// @match *://*.google.hu/search*
// @match *://*.google.sk/search*
// @match *://*.google.ro/search*
// @match *://*.google.bg/search*
// @match *://*.google.com.eg/search*
// @match *://*.google.co.za/search*
// @match *://*.google.com.sg/search*
// @match *://*.google.com.hk/search*
// @match *://*.google.co.id/search*
// @match *://*.google.co.th/search*
// @match *://*.google.com.vn/search*
// @match *://*.google.com.ph/search*
// @match *://*.google.com.my/search*
// @match *://*.google.tld/search*
// @run-at document-idle
// @grant none
// ==/UserScript==
(function () {
'use strict';
const DEBUG = true;
function log(...args) {
if (DEBUG) console.log('[Restore Shopping Tab]', ...args);
}
function addShoppingTab() {
const containers = [
document.querySelector('div[role="navigation"] div[role="list"]'),
document.querySelector('.MUFPAc'),
document.querySelector('.nfdoRb'),
document.querySelector('.T47uwc'),
document.querySelector('.NZmxZe'),
document.querySelector('.crJ18e')
];
const tabsContainer = containers.find(el => el !== null);
if (!tabsContainer) {
log('No navigation container found');
return;
}
if (tabsContainer.querySelector('.shopping-button-custom')) {
return; // Already added
}
const searchQuery = new URLSearchParams(window.location.search).get('q');
if (!searchQuery) {
log('No search query found');
return;
}
const listItem = document.createElement('div');
listItem.setAttribute('role', 'listitem');
listItem.classList.add('shopping-button-custom');
const link = document.createElement('a');
link.classList.add('nPDzT', 'T3FoJb');
link.href = `https://www.google.com/search?tbm=shop&q=${encodeURIComponent(searchQuery)}`;
const text = document.createElement('div');
text.classList.add('YmvwI');
text.textContent = 'Shopping';
link.appendChild(text);
listItem.appendChild(link);
tabsContainer.appendChild(listItem);
log('Shopping tab added');
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', addShoppingTab);
} else {
addShoppingTab();
}
let lastUrl = location.href;
const observer = new MutationObserver(() => {
const currentUrl = location.href;
if (currentUrl !== lastUrl) {
lastUrl = currentUrl;
setTimeout(addShoppingTab, 100);
}
});
observer.observe(document, { subtree: true, childList: true });
setInterval(addShoppingTab, 2000);
})();
// ==UserScript==
// @name Remove Short Videos Tab on Google
// @namespace http://tampermonkey.net/
// @version 2025-06-21
// @description Removes the "Short Videos" tab from Google search results globally across all domains and regions.
// @author Modified by ChatGPT
// @match *://*.google.com/search*
// @match *://*.google.co.uk/search*
// @match *://*.google.ca/search*
// @match *://*.google.com.au/search*
// @match *://*.google.co.in/search*
// @match *://*.google.co.jp/search*
// @match *://*.google.de/search*
// @match *://*.google.fr/search*
// @match *://*.google.nl/search*
// @match *://*.google.it/search*
// @match *://*.google.es/search*
// @match *://*.google.com.br/search*
// @match *://*.google.com.mx/search*
// @match *://*.google.ru/search*
// @match *://*.google.co.kr/search*
// @match *://*.google.com.tr/search*
// @match *://*.google.pl/search*
// @match *://*.google.se/search*
// @match *://*.google.no/search*
// @match *://*.google.fi/search*
// @match *://*.google.dk/search*
// @match *://*.google.be/search*
// @match *://*.google.pt/search*
// @match *://*.google.gr/search*
// @match *://*.google.cz/search*
// @match *://*.google.hu/search*
// @match *://*.google.sk/search*
// @match *://*.google.ro/search*
// @match *://*.google.bg/search*
// @match *://*.google.com.eg/search*
// @match *://*.google.co.za/search*
// @match *://*.google.com.sg/search*
// @match *://*.google.com.hk/search*
// @match *://*.google.co.id/search*
// @match *://*.google.co.th/search*
// @match *://*.google.com.vn/search*
// @match *://*.google.com.ph/search*
// @match *://*.google.com.my/search*
// @match *://*.google.tld/search*
// @run-at document-idle
// @grant none
// ==/UserScript==
(function() {
'use strict';
const DEBUG = true;
function log(...args) {
if (DEBUG) console.log('[Remove Short Videos Tab]', ...args);
}
function removeShortVideosTab() {
const possibleContainers = [
document.querySelector('div[role="navigation"] div[role="list"]'),
document.querySelector('.MUFPAc'),
document.querySelector('.nfdoRb'),
document.querySelector('.T47uwc'),
document.querySelector('.NZmxZe'),
document.querySelector('.crJ18e')
];
const tabsContainer = possibleContainers.find(el => el !== null);
if (!tabsContainer) {
log('Navigation tabs container not found.');
return;
}
const tabs = tabsContainer.querySelectorAll('[role="listitem"], a');
tabs.forEach(tab => {
const text = tab.textContent?.toLowerCase();
if (text && text.includes('short video')) {
log('Removing tab:', text);
tab.closest('[role="listitem"]')?.remove();
}
});
}
// Initial load
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', removeShortVideosTab);
} else {
removeShortVideosTab();
}
// Watch for dynamic page changes
let lastUrl = location.href;
const observer = new MutationObserver(() => {
const currentUrl = location.href;
if (currentUrl !== lastUrl) {
lastUrl = currentUrl;
setTimeout(removeShortVideosTab, 100);
}
});
observer.observe(document, { subtree: true, childList: true });
// Periodic backup check
setInterval(removeShortVideosTab, 2000);
})();
// ==UserScript==
// @name Remove Web Tab on Google (Only)
// @namespace http://tampermonkey.net/
// @version 2025-06-21
// @description Removes the "Web" tab from Google search results (does NOT remove "All" tab). Works across all major Google domains and regions only if "Web" tab is present separately as shown in screenshot.
// @author ChatGPT
// @match *://*.google.com/search*
// @match *://*.google.co.uk/search*
// @match *://*.google.ca/search*
// @match *://*.google.com.au/search*
// @match *://*.google.co.in/search*
// @match *://*.google.co.jp/search*
// @match *://*.google.de/search*
// @match *://*.google.fr/search*
// @match *://*.google.nl/search*
// @match *://*.google.it/search*
// @match *://*.google.es/search*
// @match *://*.google.com.br/search*
// @match *://*.google.com.mx/search*
// @match *://*.google.ru/search*
// @match *://*.google.co.kr/search*
// @match *://*.google.com.tr/search*
// @match *://*.google.pl/search*
// @match *://*.google.se/search*
// @match *://*.google.no/search*
// @match *://*.google.fi/search*
// @match *://*.google.dk/search*
// @match *://*.google.be/search*
// @match *://*.google.pt/search*
// @match *://*.google.gr/search*
// @match *://*.google.cz/search*
// @match *://*.google.hu/search*
// @match *://*.google.sk/search*
// @match *://*.google.ro/search*
// @match *://*.google.bg/search*
// @match *://*.google.com.eg/search*
// @match *://*.google.co.za/search*
// @match *://*.google.com.sg/search*
// @match *://*.google.com.hk/search*
// @match *://*.google.co.id/search*
// @match *://*.google.co.th/search*
// @match *://*.google.com.vn/search*
// @match *://*.google.com.ph/search*
// @match *://*.google.com.my/search*
// @match *://*.google.tld/search*
// @run-at document-idle
// @grant none
// ==/UserScript==
(function() {
'use strict';
const DEBUG = true;
function log(...args) {
if (DEBUG) console.log('[Remove Web Tab]', ...args);
}
function removeWebTab() {
const possibleContainers = [
document.querySelector('div[role="navigation"] div[role="list"]'),
document.querySelector('.MUFPAc'),
document.querySelector('.nfdoRb'),
document.querySelector('.T47uwc'),
document.querySelector('.NZmxZe'),
document.querySelector('.crJ18e')
];
const tabsContainer = possibleContainers.find(el => el !== null);
if (!tabsContainer) {
log('Navigation tabs container not found.');
return;
}
const tabs = tabsContainer.querySelectorAll('[role="listitem"], a');
tabs.forEach(tab => {
const text = tab.textContent?.trim().toLowerCase();
if (text === 'web') {
log('Removing "Web" tab:', tab.textContent);
tab.closest('[role="listitem"]')?.remove();
}
});
}
// Initial load
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', removeWebTab);
} else {
removeWebTab();
}
// Watch for dynamic page changes
let lastUrl = location.href;
const observer = new MutationObserver(() => {
const currentUrl = location.href;
if (currentUrl !== lastUrl) {
lastUrl = currentUrl;
setTimeout(removeWebTab, 100);
}
});
observer.observe(document, { subtree: true, childList: true });
// Periodic backup check
setInterval(removeWebTab, 2000);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment