Skip to content

plantindesk/UTTP-Blocker

Repository files navigation

YouTube UTTP Bot Blocker

YouTube UTTP Bot Blocker Logo

Badge Commits Badge Issues Badge License Badge Mozilla Badge Chrome Badge Edge

Browser Install from ...
Chrome Chrome Web Store
Firefox Firefox Add-ons
Edge Microsoft Edge Add-ons
Github 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.


Features

  • 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 MutationObserver to 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

See It in Action

Before After
YouTube comments with UTTP bot spam YouTube comments with UTTP bot spam removed

Table of Contents

Installation

Official Stores

Install directly from your browser's extension store:

Manual Installation (for Development)

These steps are for local testing or manual installation.

  1. Download or clone this repository to your local machine.
  2. Run bun dev for Chrome, bun dev:firefox for Firefox.
  3. Open YouTube and visit any video page — bot comments from "@UTTP" users will automatically disappear in real time.

How It Works

  1. 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.

  2. DOM Monitoring with MutationObserver
    A MutationObserver watches 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.

  3. 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.
  4. 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.

Technical Overview

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.

Privacy

This extension performs all filtering locally in your browser. It does not send or store any personal data or analytics externally.

Contributing

We welcome contributions from the community! If you encounter issues, false positives, or have suggestions for improvement, please:

  1. Check existing issues to avoid duplicates
  2. Open a new issue with detailed information about the problem
  3. Submit a pull request with your proposed changes

Your feedback and contributions help make YouTube a better place for everyone.

License

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.

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors