Otravují vás sponzorované odkazy na začátku výsledků vyhledávání na google.com?
Níže je rychlý GreaseMonkey / Tampermonkey skript, který tyto odkazy automaticky skryje. Stačí ho nainstalovat a nastavit pro google.com.
// ==UserScript==
// @name Hide Google Sponsored Results
// @namespace https://stefula.cz/
// @version 1.0
// @description Automatically hides sponsored/ad results on Google search
// @author CyberTriber
// @match https://www.google.com/search*
// @grant none
// @run-at document-idle
// ==/UserScript==
(function () {
'use strict';
/**
* Clicks all visible "hide sponsored" toggles on the page.
* The toggle div uses jscontroller="zUBn7b" and contains a span
* with the text "Hide sponsored result".
*/
function hideSponsoredResults() {
// Find toggle buttons by stable text content — independent of dynamic class/jscontroller names.
// Google always renders two spans inside the toggle:
// "Show sponsored result" (visible when ads are hidden)
// "Hide sponsored result" (visible when ads are shown)
// We locate every element whose text includes "Hide sponsored result" and is currently visible,
// then walk up to the nearest role="button" ancestor and click it.
const allSpans = document.querySelectorAll('span');
allSpans.forEach(span => {
if (span.textContent.trim() !== 'Hide sponsored result') return;
// Skip if this label is already hidden (ads already collapsed)
if (window.getComputedStyle(span).display === 'none') return;
// Walk up to the clickable container (has role="button")
const button = span.closest('[role="button"]');
if (button) {
button.click();
}
});
}
// Run once when the page first loads
hideSponsoredResults();
// Re-run whenever Google dynamically updates the results (SPA navigation / infinite scroll).
// Throttled to avoid excessive calls during rapid DOM mutations.
let debounceTimer = null;
const observer = new MutationObserver(() => {
clearTimeout(debounceTimer);
debounceTimer = setTimeout(hideSponsoredResults, 300);
});
observer.observe(document.body, {
childList: true,
subtree: true
});
})();

Pokud budete chtít skrýt celý blok sponzorovaných odkazů a výsledků (Sponsored links, Sponsored results), můžete použít tento alternativní skript, skrývá celý wrapper reklamního bloku (ne jen vnitřní panel), má fallback přes nadpisy sekce, když Google změní interní strukturu a zároveň ale zachovává viditelnou sekci s AI výsledky, která se objevuje pod sponzorovanými odkazy.
// ==UserScript==
// @name Google Sponsored Hider (Optimal)
// @namespace https://stefula.cz/
// @version 1.2
// @description Hides sponsored sections on Google Search with low risk of layout breakage.
// @author CyberTriber
// @match https://www.google.com/search*
// @grant none
// @run-at document-idle
// ==/UserScript==
(function () {
'use strict';
const HIDE_CLASS = 'ct-sponsored-hidden';
const TOGGLE_HIDE_LABELS = [
'show sponsored result',
'show sponsored results',
'hide sponsored result',
'hide sponsored results',
'show sponsored link',
'show sponsored links',
'hide sponsored link',
'hide sponsored links',
'show sponzored link',
'show sponzored links',
'hide sponzored link',
'hide sponzored links',
'zobrazit sponzorovaný odkaz',
'zobrazit sponzorované odkazy',
'skrýt sponzorovaný odkaz',
'skrýt sponzorované odkazy',
'zobrazit sponzorovaný výsledek',
'zobrazit sponzorované výsledky',
'skrýt sponzorovaný výsledek',
'skrýt sponzorované výsledky'
];
const SPONSORED_WORDS = [
'sponsored',
'sponsored link',
'sponsored links',
'sponzored link',
'sponzored links',
'sponzorované',
'sponzorovaný odkaz',
'sponzorované odkazy',
'reklama',
'ad'
];
const SPONSORED_SECTION_LABELS = [
'sponsored result',
'sponsored results',
'sponsored link',
'sponsored links',
'sponzored link',
'sponzored links',
'sponzorovaný výsledek',
'sponzorované výsledky',
'sponzorovaný odkaz',
'sponzorované odkazy'
];
const ROOT_GUARDS = new Set(['search', 'main', 'rcnt']);
function normalizeText(value) {
return (value || '').replace(/\s+/g, ' ').trim().toLowerCase();
}
function containsAny(text, needles) {
const t = normalizeText(text);
return needles.some(n => t.includes(n));
}
function ensureStyle() {
if (document.getElementById('ct-sponsored-style')) return;
const style = document.createElement('style');
style.id = 'ct-sponsored-style';
style.textContent = `.${HIDE_CLASS} { display: none !important; }`;
document.head.appendChild(style);
}
function isVisible(el) {
if (!el) return false;
const style = window.getComputedStyle(el);
return style.display !== 'none' && style.visibility !== 'hidden';
}
function hasSponsoredSignals(container) {
if (!container) return false;
const text = container.textContent || '';
if (containsAny(text, SPONSORED_WORDS)) return true;
// Common ad link traces in Google results
if (container.querySelector('a[href*="adurl="], a[href*="aclk"], a[data-pcu]')) {
return true;
}
return false;
}
function findSmallestSharedContainer(toggle, panel) {
if (!toggle || !panel) return panel;
const panelSection = panel.closest('g-section-with-header');
if (panelSection && panelSection.contains(toggle)) return panelSection;
let node = panel;
let depth = 0;
// Climb just a few levels to avoid grabbing whole search root.
while (node && node !== document.body && depth < 8) {
if (ROOT_GUARDS.has(node.id)) break;
if (node.contains(toggle) && hasSponsoredSignals(node)) {
return node;
}
node = node.parentElement;
depth += 1;
}
return panel;
}
function findSponsoredBlockContainer(toggle, panel) {
if (!toggle || !panel) return panel;
const directCandidates = [
toggle.closest('.vbIt3d'),
panel.closest('.vbIt3d'),
toggle.closest('#tads'),
panel.closest('#tads'),
toggle.closest('#tadsb'),
panel.closest('#tadsb')
].filter(Boolean);
for (const candidate of directCandidates) {
const txt = candidate.textContent || '';
if (containsAny(txt, SPONSORED_SECTION_LABELS) || hasSponsoredSignals(candidate)) {
return candidate;
}
}
return findSmallestSharedContainer(toggle, panel);
}
function hideNode(node) {
if (!node || node.classList.contains(HIDE_CLASS)) return;
node.classList.add(HIDE_CLASS);
}
function processToggle(toggle) {
if (!toggle || toggle.dataset.ctProcessed === '1') return;
const labelSpan = Array.from(toggle.querySelectorAll('span')).find(span =>
containsAny(span.textContent, TOGGLE_HIDE_LABELS)
);
if (!labelSpan) return;
const panelId = toggle.getAttribute('aria-controls');
if (!panelId) return;
const panel = document.getElementById(panelId);
if (!panel) return;
// Safety gate: hide only if the controlled area looks like sponsored/ad content.
if (!hasSponsoredSignals(panel) && !hasSponsoredSignals(toggle.parentElement)) {
return;
}
// Collapse first (keeps behavior aligned with native UI), then hard-hide container.
if (isVisible(labelSpan)) {
toggle.click();
}
const section = findSponsoredBlockContainer(toggle, panel);
hideNode(section);
toggle.dataset.ctProcessed = '1';
}
function run() {
const toggles = document.querySelectorAll('[role="button"][aria-controls]');
toggles.forEach(processToggle);
// Fallback: hide wrappers with sponsored headings even if toggle linkage changes.
const headings = document.querySelectorAll('[role="heading"], h1, h2, h3, h4, h5, h6, .L8u9l, .PBBEhf, .iInZTe');
headings.forEach(el => {
if (!containsAny(el.textContent, SPONSORED_SECTION_LABELS)) return;
const block = el.closest('.vbIt3d, #tads, #tadsb, .qGXjvb');
if (block) hideNode(block);
});
}
ensureStyle();
run();
let timer = null;
const observer = new MutationObserver(() => {
clearTimeout(timer);
timer = setTimeout(run, 200);
});
observer.observe(document.body, {
childList: true,
subtree: true
});
})();