| Browser | Install from ... |
|---|---|
| Chrome Web Store | |
| Firefox Add-ons | |
| Microsoft Edge Add-ons | |
| GitHub |
YouTube UTTP Bot Blocker is a lightweight browser extension that automatically detects and removes spam comments posted by UTTP (YouTube Troll Police) bot accounts on YouTube. These bots typically use usernames beginning with "@UTTP" and flood comment sections with repetitive or malicious messages.
The problem of UTTP bot spam has been growing increasingly disruptive to YouTube communities, making it difficult to engage in genuine discussions. This extension provides an efficient solution by filtering out these unwanted comments in real-time, allowing you to focus on authentic community interactions without the distraction of spam.
- Automatic bot detection: Instantly identifies comments posted by users whose names begin with
@UTTP - Smart comment removal: Deletes detected bot comments directly from the YouTube comment section
- Real-time monitoring: Continuously scans the page using a
MutationObserverto detect and remove new spam comments as they load - Dynamic handling: Detects and filters comments that appear when "View replies" or similar buttons are clicked
- Background data logging: Sends and stores a list of visible comments for optional analysis or debugging
| Before | After |
|---|---|
![]() |
![]() |
Install directly from your browser's extension store:
These steps are for local testing or manual installation.
- Download or clone this repository to your local machine.
- Run
bun devfor Chrome,bun dev:firefoxfor Firefox. - Open YouTube and visit any video page — bot comments from "@UTTP" users will automatically disappear in real time.
-
Content Script Activation (
content/index.ts)
The extension injects a content script into all YouTube pages (*://*.youtube.com/*). This script monitors the comment section for any changes to the DOM, such as new comments being loaded or replies being expanded. -
DOM Monitoring with MutationObserver
AMutationObserverwatches for changes in the YouTube comment section (document.body). Whenever new comment elements appear (for example, after scrolling or clicking "View replies"), the observer triggers a rescan of the comments. -
Comment Scanning (
content/comment-scraper.ts)
The comment scraper iterates through all comment elements (ytd-comment-view-model,ytd-comment-renderer) and extracts the author's name and comment text.- If the author's username starts with
@UTTP, the comment is immediately removed from the DOM. - All other comments are collected and sent to the background script for optional storage.
- If the author's username starts with
-
Background Message Handling (
entrypoints/background/index.ts)
The background script listens for messages of type"comments"from the content script. When received, it logs the scraped comments and stores them in the browser's local storage (localStorage.setItem("youtube_comments", ...)) for reference or debugging.
| Component | File | Purpose |
|---|---|---|
| Background Script | entrypoints/background/index.ts |
Receives messages from the content script and logs comments to local storage. |
| Content Script | content/index.ts |
Injected into YouTube pages; observes DOM mutations and triggers comment scraping. |
| Comment Scraper | content/comment-scraper.ts |
Scans and removes comments authored by accounts starting with @UTTP. |
This extension performs all filtering locally in your browser. It does not send or store any personal data or analytics externally.
We welcome contributions from the community! If you encounter issues, false positives, or have suggestions for improvement, please:
- Check existing issues to avoid duplicates
- Open a new issue with detailed information about the problem
- Submit a pull request with your proposed changes
Your feedback and contributions help make YouTube a better place for everyone.
This project is licensed under the GPL-3.0 License. You are free to use, modify, and distribute it under the terms of that license.

