Google Exclusions Dynamic Clean

Blocks keywords and websites from Google search.

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
ScriptKing
日安装量
0
总安装量
0
评分
0 0 0
版本
2.0
创建于
2025-11-22
更新于
2025-11-22
大小
3.5 KB
许可证
MIT
适用于

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.