Skip to content

A powerful Chrome extension that intelligently filters out clickbait, negative, and crisis-related content from YouTube to improve your viewing experience. Features a modern dark-themed interface with real-time filtering statistics and dynamic icon switching.

Notifications You must be signed in to change notification settings

RoryGlenn/YoutubeClickBaitFilter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

55 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

YouTube ClickBait Filter

A powerful Chrome extension that intelligently filters out clickbait, negative, and crisis-related content from YouTube to improve your viewing experience. Features a modern dark-themed interface with real-time filtering statistics and dynamic icon switching.

Chrome Extension Version Tests Performance Chrome Web Store Ready

✨ Features

  • 🎯 Smart Content Filtering: Automatically hides videos with clickbait words like "shocking", "unprecedented", "urgent"
  • 🎣 Advanced Clickbait Detection: Filters common clickbait phrases like "You Won't Believe", "What Happens Next"
  • πŸ”  Uppercase Filter: Intelligently detects and hides titles with excessive capitalization (3+ uppercase words)
  • ❗❓ Punctuation Filter: Removes titles with excessive exclamation or question marks (3+ in a row)
  • βš™οΈ Configurable Settings: Enable or disable each filter independently with persistent settings
  • πŸ“Š Real-time Badge Counter: Extension icon displays live count of blocked videos on current page
  • πŸ”„ Per-page Filtering: Counter resets automatically when navigating to new YouTube pages
  • 🎨 Dynamic Icon Switching: Icon changes color based on filter status (active/inactive)
  • πŸŒ™ Modern Dark UI: Beautiful dark-themed popup with orange accent colors
  • πŸš€ Performance Optimized: Efficient DOM monitoring with minimal impact on browsing experience
  • πŸ”’ Privacy First: All filtering happens locally - no data collection or external servers

πŸš€ Quick Start

Installation from Source

  1. Clone the repository

    git clone https://github.com/RoryGlenn/YoutubeClickBaitFilter.git
    cd YoutubeClickBaitFilter
  2. Install dependencies and build

    npm install
    npm run build
  3. Load in Chrome

    • Open Chrome and go to chrome://extensions/
    • Enable "Developer mode" (toggle in top-right)
    • Click "Load unpacked" and select the dist/ folder
    • Pin the extension to your toolbar

Chrome Web Store Installation

Coming Soon! This extension will be available on the Chrome Web Store. See Chrome Web Store Preparation for current status.

Usage

  • Enable/Disable: Click the extension icon to toggle filters
  • Configure: Use the popup to enable/disable specific filter types
  • Monitor: Badge shows count of blocked videos on current page
  • Status: Icon color indicates filter status (colored = active, grey = inactive)

πŸ—οΈ Project Structure

YoutubeClickBaitFilter/
β”œβ”€β”€ src/                     # Source code
β”‚   β”œβ”€β”€ background/          # Background script for badge management
β”‚   β”‚   └── background.js    # Badge updates and extension lifecycle
β”‚   β”œβ”€β”€ popup/               # Extension popup interface
β”‚   β”‚   β”œβ”€β”€ popup.html       # Popup interface
β”‚   β”‚   β”œβ”€β”€ popup.css        # Dark theme styling
β”‚   β”‚   └── popup.js         # Settings management and icon switching
β”‚   β”œβ”€β”€ content/             # Content scripts for YouTube filtering
β”‚   β”‚   └── filter.js        # Main filtering logic for YouTube pages
β”‚   β”œβ”€β”€ shared/              # Shared utilities and constants
β”‚   β”‚   └── constants.js     # Clickbait words and phrases definitions
β”‚   └── manifest.json        # Chrome extension manifest (Manifest V3)
β”œβ”€β”€ assets/icons/            # Extension icons (active and inactive states)
β”‚   β”œβ”€β”€ icon*.png           # Active state icons (colored)
β”‚   └── grey/               # Inactive state icons (greyscale)
β”œβ”€β”€ test/                   # Unit tests (48+ tests)
β”‚   β”œβ”€β”€ constants.test.js   # Test clickbait definitions
β”‚   β”œβ”€β”€ edge-cases.test.js  # Edge case scenarios
β”‚   β”œβ”€β”€ integration.test.js # Integration testing
β”‚   β”œβ”€β”€ performance.test.js # Performance benchmarks
β”‚   └── video-hiding.test.js # Core filtering logic tests
β”œβ”€β”€ integration-tests/      # Browser-based integration tests
β”‚   β”œβ”€β”€ README.md           # Integration testing guide
β”‚   β”œβ”€β”€ test-logic.js       # Integration test utilities
β”‚   β”œβ”€β”€ youtube-html-test.html # Interactive testing interface
β”‚   β”œβ”€β”€ youtube-html-test.css  # Test interface styling
β”‚   β”œβ”€β”€ youtube-html-test.js   # Test interface JavaScript
β”‚   └── complex-sample.html # Complex YouTube structure samples
β”œβ”€β”€ scripts/                # Build and utility scripts
β”‚   └── build.js           # esbuild-based build system
β”œβ”€β”€ store-assets/           # Chrome Web Store submission materials
β”‚   β”œβ”€β”€ privacy-policy.html # Web Store compliant privacy policy
β”‚   β”œβ”€β”€ store-description.md # Complete store listing content
β”‚   β”œβ”€β”€ screenshot-guidelines.md # Screenshot requirements
β”‚   └── submission-checklist.md # Step-by-step submission guide
β”œβ”€β”€ docs/                   # Comprehensive documentation
β”‚   β”œβ”€β”€ USER_GUIDE.md      # Detailed user instructions
β”‚   β”œβ”€β”€ DEVELOPMENT.md     # Development workflow guide
β”‚   β”œβ”€β”€ API.md             # Complete API reference
β”‚   β”œβ”€β”€ INDEX.md           # Documentation index
β”‚   └── PRIVACY_POLICY.md  # Privacy policy and data handling
└── dist/                   # Built extension (generated)
    β”œβ”€β”€ manifest.json       # Processed manifest for Chrome
    β”œβ”€β”€ background.js       # Background script
    β”œβ”€β”€ popup.*             # Popup files
    β”œβ”€β”€ filter.bundle.js    # Bundled content script
    └── icons/              # Icon assets

πŸ§ͺ Testing

πŸ§ͺ Testing

Test Coverage

  • 48+ tests covering all major functionality
  • Performance benchmarks (160k+ titles/second processing)
  • Edge case handling (empty strings, special characters, etc.)
  • Integration testing with real YouTube HTML structures
  • Memory usage monitoring and optimization validation

Running Tests

# Full test suite
npm test

# Individual test categories
npm run test:constants     # Clickbait word/phrase definitions
npm run test:performance   # Speed and memory benchmarks  
npm run test:edge-cases    # Boundary conditions and edge cases
npm run test:integration   # End-to-end filtering scenarios

# Watch mode for development
npm run test:watch

Integration Tests

Interactive browser-based tests for validating filter logic against real YouTube content:

# Start local server for integration tests
python3 -m http.server 8000
# Then open: http://localhost:8000/integration-tests/youtube-html-test.html

See Integration Tests README for detailed usage instructions.

πŸ“Š Performance

  • Processing Speed: 160,000+ titles per second
  • Memory Usage: <3MB increase during operation
  • DOM Query Time: <1ms for typical YouTube page
  • Extension Load Time: <100ms startup
  • Build Size: ~1.3MB packaged extension

πŸ›’ Chrome Web Store

This extension is ready for Chrome Web Store submission with:

  • βœ… Manifest V3: Full compliance with latest Chrome extension standards
  • βœ… Privacy Policy: Comprehensive privacy documentation
  • βœ… Store Assets: Professional descriptions, screenshots guidelines
  • βœ… Security: Minimal permissions, no external data transmission
  • βœ… Quality: Extensive testing suite with 48+ tests

Current Status: Prepared for submission. See store-assets/ directory for all submission materials.

πŸ”’ Privacy & Security

  • Local Processing: All filtering happens on your device
  • No Data Collection: Zero user data transmission or tracking
  • Minimal Permissions: Only YouTube access and local storage
  • Open Source: Full source code available for security review

See Privacy Policy for complete details.

πŸ“š Documentation

πŸ› οΈ Development

Prerequisites

  • Node.js (v16+)
  • Chrome Browser
  • Git

Development Workflow

# Clone and setup
git clone https://github.com/RoryGlenn/YoutubeClickBaitFilter.git
cd YoutubeClickBaitFilter

# Install dependencies
npm install

# Build extension
npm run build

# Run tests
npm test

# Format code
npm run format

# Load extension in Chrome for testing
# (Point to dist/ folder in chrome://extensions/)

Build Process

The extension uses a modern build pipeline:

  • esbuild: Fast JavaScript bundling and minification
  • Manifest processing: Automatic path resolution and validation
  • Asset copying: Icons, HTML, and CSS file management
  • ES Modules: Support for modern JavaScript features

Chrome Web Store Deployment

# Build production version
npm run build

# Create submission package
cd dist && zip -r ../youtube-clickbait-filter-v1.0.0.zip . -x "*.DS_Store"

# Follow submission guide
# See store-assets/submission-checklist.md for complete instructions

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make changes and add tests
  4. Run the test suite: npm test
  5. Format code: npm run format
  6. Commit changes: git commit -m 'Add amazing feature'
  7. Push to branch: git push origin feature/amazing-feature
  8. Open a Pull Request

See Development Guide for detailed contribution guidelines.

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ› Issues & Support

🌟 Show Your Support

If this extension improves your YouTube experience, please:

  • ⭐ Star this repository
  • πŸ› Report bugs or suggest features
  • 🀝 Contribute code or documentation
  • πŸ“’ Share with others who might benefit

Made with ❀️ to improve your YouTube experience

About

A powerful Chrome extension that intelligently filters out clickbait, negative, and crisis-related content from YouTube to improve your viewing experience. Features a modern dark-themed interface with real-time filtering statistics and dynamic icon switching.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published