Google Exclusions Dynamic Clean

Blocks keywords and websites from Google search.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Author
ScriptKing
Daily installs
0
Total installs
2
Ratings
0 0 0
Version
2.0
Created
2025-11-22
Updated
2025-11-22
Size
3.46 KB
License
MIT
Applies to

This Tampermonkey userscript automatically blocks unwanted websites and keywords from Google searches by dynamically appending a list of exclusions to your search queries. It ensures that Google’s search results exclude these terms while keeping your search input clean and user-friendly.

Key Features:

1. Dynamic Exclusion List – Define any number of websites or keywords in the `exclusions` array.
2. Automatic Query Modification – Before a search is submitted (via Enter key or search button), the script appends all exclusions (`-example.com`, `-keyword`) to your query.
3. Input Cleanup – Once the search results load, the script removes all appended exclusions from the search input bar so it displays a clean query.
4. Works with Instant Search – Observes DOM changes to dynamically clean the input and reapply exclusions as Google updates the page without full reloads.
5. Supports Multiple Submission Methods – Handles pressing Enter, clicking the search button, or single-page navigation updates.
6. Lightweight and Compatible – Uses plain JavaScript with minimal overhead and works on standard Google search pages.

Use Case:

- Avoid seeing results from specific websites, for example `reddit.com`.
- Filter out certain keywords automatically without having to type exclusions manually each time.
- Maintain a clean search bar without showing the exclusion filters.

How it Works (High-Level):

- Waits for the search input and search button to be available.
- Modifies your query on submission by appending exclusions.
- Cleans the search input to remove any `-website` or `-keyword` strings after search results load.
- Observes page mutations for dynamic updates on Google’s instant search results.