Blocks keywords and websites from Google search.
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.