Firefox 浏览器附加组件
  • 扩展
  • 主题
    • 适用于 Firefox
    • 字典和语言包
    • 其他浏览器网站
    • 适用于 Android 的附加组件
登录
YouTube Channel Purge 预览

YouTube Channel Purge 作者: Sp33d0r

Block YouTube channels from appearing in your recommendations. Easily manage blocked channels with import/export support.

0(0 条评价)0(0 条评价)
7 个用户7 个用户
下载 Firefox 并安装扩展
下载文件

扩展元数据

关于此扩展
YouTube Channel Blocker

A Firefox extension that allows you to block YouTube channels from appearing in your recommendation feed. When you block a channel, all videos from that channel will be hidden from the recommended videos section on YouTube.

Features
  • ✅ Block channels by name - Simply enter the channel name to hide all their recommendations
  • ✅ Persistent blocking - Blocked channels remain hidden even after browser restart
  • ✅ Block counters - Track how many times each blocked channel was detected and hidden
  • ✅ Import/Export - Share your blocked channels list or backup for later use (with optional counter statistics)
  • ✅ Real-time filtering - Automatically hides recommendations as YouTube loads new content
  • ✅ Clean UI - Easy-to-use popup interface for managing blocked channels
  • ✅ Wildcard matching - Use * for partial channel name matching
  • ✅ Badge indicator - Shows the number of blocked channels on the extension icon
  • ✅ Flexible sorting - Sort channels alphabetically (A-Z or Z-A) or by block count (most/least blocked)
  • ✅ Temporary unblock - Pause blocking for specific channels without losing counters, easily resume later
  • ✅ Expandable popup - Toggle button to expand the popup window vertically for viewing more channels
  • ✅ Enhanced statistics - Stats display with highlighted numbers for better visibility

Installation

Method 1: Temporary Installation (for testing)
  1. Download or clone this repository to your computer
  2. Generate icon files (choose one method):

Method A - HTML Generator (Recommended):
- Open icons/generate-icons.html in Firefox or any browser
- Click the "⬇️ Download icon-48.png" button and save to the icons folder
- Click the "⬇️ Download icon-96.png" button and save to the icons folder

Method B - PowerShell Script:
- Open PowerShell in the extension folder
- Run: .\generate-icons.ps1
- Icons will be created automatically in the icons folder
  1. Open Firefox and navigate to about:debugging
  2. Click "This Firefox" in the left sidebar
  3. Click "Load Temporary Add-on"
  4. Navigate to the extension folder and select the manifest.json file
  5. The extension is now loaded temporarily (will be removed when Firefox restarts)

Method 2: Permanent Installation (developer mode)
  1. Follow steps 1-2 from Method 1
  2. Open Firefox and navigate to about:config
  3. Search for xpinstall.signatures.required and set it to false
  4. Package the extension:
  5. Zip all files in the extension folder (not the folder itself)
  6. Rename the .zip file to .xpi
  7. Navigate to about:addons
  8. Click the gear icon and select "Install Add-on From File"
  9. Select your .xpi file

Method 3: Firefox Developer Edition

For the most convenient development experience, use Firefox Developer Edition which allows unsigned extensions to run permanently.

Usage

Blocking a Channel
  1. Click the extension icon in your Firefox toolbar (red YouTube icon with a block symbol)
  2. Enter the exact channel name you want to block in the text field
  3. Example: "The Heritage Foundation"
  4. Channel names are case-insensitive
  5. Exact match required - "The" won't block "The Heritage Foundation"
  6. Use wildcard for partial matching:
  7. Add * at the end to block all channels starting with that text
  8. Example: "Fox News*" will block "Fox News", "Fox News Clips", "Fox News Shorts", etc.
  9. Example: "BBC*" will block "BBC News", "BBC World", "BBC Sport", etc.
  10. Click "Block Channel" or press Enter
  11. The channel will be added to your blocked list
  12. Reload YouTube or navigate to a new video to see the changes

Unblocking a Channel
  1. Open the extension popup
  2. Find the channel in your blocked list
  3. View the counter badge next to the channel name showing how many times it was blocked
  4. Click the "Pause" button to temporarily unblock the channel (videos will reappear, counter preserved)
  5. Click the "Resume" button to re-enable blocking for a paused channel
  6. Click the "Edit" button to modify the channel name
  7. Click the "Unblock" button to permanently remove the channel from the blocked list (this also removes its counter)

Managing Multiple Channels
  • View all blocked channels in the popup list
  • See the count of blocked channels and total videos hidden at the top of the list
  • Track statistics in real-time - Counter badges update automatically as channels are blocked (no page refresh needed)
  • Formatted counters - Large numbers are displayed compactly (e.g., 1.2k, 13.7k) with full count in tooltip
  • Temporarily unblock - Use the "Pause" button to see videos from a channel without losing your block count
  • Resume blocking - Paused channels show a "PAUSED" badge; click "Resume" to re-enable blocking instantly
  • Clear all blocked channels using the "Clear All" button (this also resets all counters)

Import/Export

Exporting Your Blocked List
  1. Click the "📤 Export" button in the extension popup
  2. Choose whether to include block counters in the export:
  3. ✅ Checked (default): Exports channels with statistics showing how many times each was blocked
  4. ❌ Unchecked: Exports only channel names (counters reset to zero on import)
  5. Click "Export" to download the JSON file
  6. The file is named with the current date (e.g., youtube-blocked-channels-2026-01-08.json)

Importing a Blocked List
  1. Click the "📥 Import" button
  2. Paste the JSON content from your exported file
  3. Click "Import"
  4. New channels will be added to your existing list (duplicates are automatically avoided)
  5. If the imported file includes counters, they will be imported as well
  6. If the file doesn't include counters, imported channels will start with a counter of zero

Sharing Lists

You can share your blocked channels list with others by sending them your exported JSON file. They can import it into their extension.

Note: If you want to share just the channel names without revealing your usage statistics, uncheck the "Include block counters" option when exporting.

Permissions

The extension requires the following permissions:
  • storage - To save your blocked channels list persistently
  • https://www.youtube.com/* - To run the content script on YouTube pages

Troubleshooting

Channels aren't being blocked
  1. Check the exact channel name: Make sure you entered the channel name exactly as it appears on YouTube
  2. Reload the page: After adding a channel, reload the YouTube page
  3. Check the browser console: Open Developer Tools (F12) and look for messages from "YouTube Channel Blocker"
  4. Clear processed markers: Sometimes you may need to restart Firefox

Extension not working after Firefox restart

If you installed via Method 1 (temporary), the extension is removed on restart. Use Method 2 or 3 for permanent installation.

Cannot find the channel name
  1. Go to a YouTube video page
  2. Look at the recommended videos on the right side
  3. The channel name appears below the video title
  4. Copy the exact name and paste it into the extension

Import fails

Make sure your JSON file has the correct format:

New format (v1.4+, recommended):

{
"version": "1.4",
"exportDate": "2026-02-01T12:00:00.000Z",
"channels": [
{ "name": "Channel Name 1", "count": 42, "paused": false },
{ "name": "Channel Name 2", "count": 15, "paused": true }
]
}


Previous format (v1.2, still supported):

{
"version": "1.2",
"exportDate": "2026-01-08T12:00:00.000Z",
"channels": [
{ "name": "Channel Name 1", "count": 42 },
{ "name": "Channel Name 2", "count": 15 }
]
}


Old format (v1.0-1.1, still supported):

{
"version": "1.1",
"exportDate": "2026-01-02T12:00:00.000Z",
"channels": ["Channel Name 1", "Channel Name 2"],
"counters": {
"Channel Name 1": 42,
"Channel Name 2": 15
}
}


Privacy
  • All data is stored locally in your browser
  • No data is sent to external servers
  • No tracking or analytics
  • The extension only runs on YouTube pages

Contributing

Contributions are welcome! Here are some ideas for improvements:
  • [ ] Add a quick "block this channel" button directly on recommendation elements
  • [ ] Support for blocking by channel URL or ID (more reliable than names)
  • [ ] Whitelist mode (show only specific channels)
  • [ ] Statistics on how many videos have been hidden
  • [ ] Pattern matching (e.g., block all channels containing certain keywords)
  • [ ] Support for blocking on other YouTube pages (homepage, search results)

Known Limitations
  • Channel name changes: If a channel changes its name, you'll need to update the blocked name
  • Similar names: The extension matches exact names (case-insensitive), so "Channel Name" and "ChannelName" are different
  • Dynamic content: Very rapid scrolling might occasionally show a blocked recommendation briefly before it's hidden

License

This project is released under the MIT License. Feel free to use, modify, and distribute as needed.

Support

If you encounter issues:
  1. Check the troubleshooting section above
  2. Open Firefox Developer Tools (F12) and check the Console for errors
  3. Look for messages prefixed with "YouTube Channel Blocker:"

Version History
  • v1.4.0 (2026-05-15)
  • YouTube DOM compatibility fix - Updated channel name detection to handle YouTube's redesigned recommendation elements which migrated from BEM-style CSS classes to camelCase utility classes
  • Multi-selector fallback strategy - Channel extraction now tries three methods in order: new camelCase classes → aria-label accessibility attribute → legacy BEM classes, ensuring blocking continues working across YouTube UI changes
  • Improved resilience - Using aria-label="Go to channel …" as a stable semantic fallback that YouTube must maintain for screen reader compliance
  • v1.3.0 (2026-02-01)
  • Sorting options - Sort channel list by name (A-Z or Z-A) or by block count (most/least blocked)
  • Temporary unblock - Pause blocking for any channel without losing counters; resume anytime with one click
  • Expandable popup - Toggle button (⬇️) in header to expand popup for viewing more channels
  • Enhanced stats display - Numbers in statistics are now highlighted in red for better visibility
  • Improved UI spacing - Added proper padding at the bottom of the popup for better aesthetics
  • Cleaner interface - Removed redundant tip text (wildcard hint is now only in the input placeholder)
  • Bug fixes - Fixed counter increment issues when adding new channels
  • Bug fixes - Fixed counters not updating when scrolling to load more recommendations
  • Code improvements - Simplified content script logic for more reliable counter tracking
  • v1.2.0 (2026-01-08)
  • Improved data structure - Channels now stored as objects with name and count properties
  • Better JSON format - Export format simplified, eliminates redundant counter object
  • Automatic migration - Seamlessly upgrades from v1.0 and v1.1 formats
  • Backward compatible - Can still import old format files
  • Fixed blocking for movie recommendations (ytd-compact-movie-renderer)
  • Fixed blocking for compact video recommendations (ytd-compact-video-renderer)
  • Extended DOM monitoring to handle multiple YouTube recommendation types
  • v1.1.0 (2026-01-08)
  • Added block counters to track how many times each channel is detected and hidden
  • Real-time counter updates - Counters update instan
评分 0(1 位用户)
登录以评价此扩展
目前尚无评分

已保存星级评分

5
0
4
0
3
0
2
0
1
0
尚无评价
权限与数据

必要权限:

  • 访问您在 www.youtube.com 的数据

根据开发者所述,必要的数据收集:

  • 地址

根据开发者所述,可选的数据收集有:

  • 技术和交互数据
详细了解
更多信息
附加组件链接
  • 支持邮箱
  • Copy add-on ID
版本
1.4.0
大小
47.55 KB
上次更新
9 天前 (2026年5月15日)
相关分类
  • 其他
许可证
MIT 许可证
版本历史
  • 查看所有版本
添加到收藏集
举报此附加组件
转至 Mozilla 主页

附加组件

  • 关于
  • Firefox 附加组件博客
  • 扩展工坊
  • 开发者中心
  • 开发者政策
  • 社区博客
  • 论坛
  • 报告缺陷
  • 评价指南

浏览器

  • Desktop
  • Mobile
  • Enterprise

产品

  • Browsers
  • VPN
  • Relay
  • Monitor
  • Pocket
  • Bluesky (@firefox.com)
  • Instagram (Firefox)
  • YouTube (firefoxchannel)
  • 隐私
  • Cookie
  • 法律

除非另有注明,否则本网站上的内容可按知识共享 署名-相同方式共享 3.0 或更新版本使用。