Skip to content

moscovium-mc/google-declutter-chrome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Declutter

Remove Google ads and AI-generated search results. Clean search. No distractions.

Author: moscovium-mc

Version: 0.3.0

License: MIT


What It Does

Google Declutter is a browser extension that strips unwanted content from Google Search results pages:

  • Ads — All paid/sponsored results (top, bottom, sidebar, shopping units)

  • AI Overviews — AI-generated answer boxes and AI-curated result panels

The result is a clean, organic search results page showing only what you actually searched for.


Why This Exists

Google's SERP (Search Engine Results Page) has become increasingly cluttered with commercial content and AI-generated summaries. These elements:

  • Push organic results further down the page

  • Slow down page rendering

  • Distract from actual search intent

  • Consume bandwidth with unnecessary JavaScript and tracking

This extension is a focused tool: strip the noise, keep the signal.


Installation

Chrome / Chromium

  1. Open chrome://extensions

  2. Enable Developer mode

  3. Click Load unpacked

  4. Select the src/ folder inside google-declutter-chrome/


Usage

Once installed, the extension runs automatically on Google Search pages.

  1. Click the extension icon in your toolbar to open the popup

  2. Toggle features on/off:

  • Remove Ads — strips sponsored content

  • Remove AI Overviews — strips AI-generated result boxes

  • Enable Extension — master on/off switch

  1. View real-time statistics of removed elements

  2. Click Reset Stats to zero the counter


How It Works

  1. The manifest registers a content script on all Google Search URLs (200+ TLDs)

  2. content.js uses MutationObserver to watch for DOM changes and apply selector-based removal in real time

  3. Three-layer detection pipeline catches content even when class names rotate:

    • Explicit selectors — known ad/AI containers from selectors.json (remote-updateable)
    • Label scanning — TreeWalker finds "Sponsored" / "Ad" / "AI Overview" text nodes, zero class-name dependency
    • Wildcard attribute scanning — walks every element's data-* attributes for Google AdSense/AX markers (data-ad-client, data-ad-slot, data-ai-*, data-sponsored, etc.) — catches new ad formats before they get added to the blocklist
  4. The popup communicates with the content script via chrome.tabs.sendMessage / chrome.runtime.onMessage

  5. Settings persist via chrome.storage.sync


End Goal

The long-term vision:

  • Self-maintaining selector database — auto-updating blocklist (or community-maintained via a simple JSON endpoint), now supplemented by heuristic wildcard attribute detection

  • Custom filter rules — allow users to add their own CSS selectors

  • Performance metrics — show page weight reduction and load time improvement

  • Multi-engine support — optionally extend to Bing, DuckDuckGo, Brave Search

  • No telemetry, no tracking, no data collection — the extension should require zero permissions beyond storage and the host patterns it needs to run on

  • Open source forever — MIT license, contributions welcome


Building Icon Assets

The extension requires PNG icons at three sizes. Generate them from the SVG template in icons/:

# Using Inkscape (CLI)

inkscape  src/icons/icon.svg  -w  16  -h  16  -o  src/icons/icon-16.png

inkscape  src/icons/icon.svg  -w  48  -h  48  -o  src/icons/icon-48.png

inkscape  src/icons/icon.svg  -w  128  -h  128  -o  src/icons/icon-128.png

  

# Or ImageMagick

magick  src/icons/icon.svg  -resize  16x16  src/icons/icon-16.png

magick  src/icons/icon.svg  -resize  48x48  src/icons/icon-48.png

magick  src/icons/icon.svg  -resize  128x128  src/icons/icon-128.png

Donations / Support

If you'd like to support my work, you can buy me a coffee or send crypto directly:

Buy Me a Coffee: https://buymeacoffee.com/webmoney

Bitcoin (BTC)

bc1quavqz6cxqzfy4qtvq4zxc4fjgap3s7cmxja0k4

Ethereum (ETH)

0x5287af72afbc152b09b3bf20af3693157db9e425

Solana (SOL)

HYZjfEx8NbEMJX1vL1GmGj39zA6TgMsHm5KCHWSZxF4j

Monero (XMR)

86zv6vTDuG35sdBzBpwVAsD71hbt2gjH14qiesyrSsMkUAWHQkPZyY9TreeQ5dXRuP57yitP4Yn13SQEcMK4MhtwFzPoRR1


Development

git  clone  <repo-url>

cd  google-declutter

# Edit source files in src/

# Load unpacked in browser to test

No build step required. The extension is vanilla JavaScript with zero dependencies.


License

MIT — see LICENSE file.


Clean search. No distractions.

About

Removes Google ads and AI-generated search results for clean, organic search results.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors