Skip to content

Site cleanup: Google Search - #36

Merged
codepurse merged 1 commit into
mainfrom
feature/google-search-cleanup
Oct 30, 2026
Merged

codepurse merged 1 commit into
mainfrom
feature/google-search-cleanup

Conversation

@codepurse

@codepurse codepurse commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

A second site in Site cleanup, after YouTube: Clean up Google Search, ten switches, all off until turned on, behind one master switch.

  • Show web results only: every search opens on Google's Web tab (udm=14), a plain list of links, before the cluttered page is requested. Images, News, AI Mode and the other tabs still open as asked; only "All" becomes "Web".
  • Hide AI Overviews (at the top and further down) and Hide AI Mode (the tab and the search-box button).
  • Hide "People also ask", "Discussions and forums", short videos, the video row, Top stories, product grids and "People also search for".

How it works

  • Boxes are found by the tab their "more" link points to (udm=forums, udm=vids, tbm=nws, udm=50 …) or by data attributes, never by heading text, so it works in any language (checked in English and German).
  • Every rule matches only the innermost result block, so a Google layout change can make it miss a box but never hide real results.
  • content/google-clean.js + google-clean.css are injected on www.google.* only (include_globs), so the every-page script budget is unchanged (161,320).
  • background/google-web-only.js + rules/google-web-only-rules.json: a static ruleset, off by default, flipped like the YouTube ones. Its regex fits Chrome's RE2 2 KB limit; the first version used https? and silently never matched, so this one was checked with isRegexSupported and a real redirected search in Edge.
  • Settings card, README, build scripts, both manifests.

Testing

  • npm test, including the new test/google-cleanup-test.mjs.
  • Verified by hand in Chrome, and with the packaged build in headless Edge.
  • Not checked in Firefox yet.

Sieve Pro (#37) is stacked on this branch, so please merge this one first.

A second site in Site cleanup, after YouTube. Ten switches, all off until
turned on, behind a "Clean up Google Search" master switch:

- Show web results only: every search opens on Google's Web tab
  (udm=14), a plain list of links, before the cluttered page is
  requested. Images, News, AI Mode and the other tabs still open as
  asked; only "All" becomes "Web".
- Hide AI Overviews (top of the page and the ones placed further down)
  and Hide AI Mode (the tab and the search-box button).
- Hide "People also ask", "Discussions and forums", short videos, the
  video row, Top stories, product grids and "People also search for".

Boxes are found by the tab their "more" link points to (udm=forums,
udm=vids, tbm=nws, udm=50 ...) or by data attributes, never by heading
text, so it works in any language (checked in English and German). Every
block rule only matches the innermost result block, so a layout change
can make it miss a box but never hide real results.

- content/google-clean.js + google-clean.css: class driver and styles,
  injected on www.google.* only via include_globs, so the every-page
  script budget is unchanged (161,320).
- background/google-web-only.js + rules/google-web-only-rules.json: a
  static ruleset, off by default, flipped like the YouTube ones. Its
  regex had to fit Chrome's RE2 2 KB limit: the first version used
  https? and silently never matched; this one was checked with
  isRegexSupported and a real redirected search in Edge.
- Settings card, README, build scripts, both manifests; new
  test/google-cleanup-test.mjs, and the YouTube card test now reads
  only the YouTube card.

Verified by hand in Chrome and with the packaged build in headless Edge.
Firefox not checked yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codepurse
codepurse merged commit 21a6ce2 into main Oct 30, 2026
1 check passed
codepurse added a commit that referenced this pull request Oct 30, 2026
Brings in the Google Search cleanup (#36), Brave, Yahoo and Swisscows in
the Search Result Filter (#38) and the 1.5.1 release merges.

One conflict, in common/changelog.js: both sides added a new entry at
the top. Both are kept, 1.6.0 above 1.5.2, so neither release loses its
notes. npm test 892, test:pro 59.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant