Git Product home page Git Product logo

blocktube's Introduction

BlockTube

WebExtension for Chrome and Firefox.
Filter and block unwanted content from YouTube™.

Extension features

  • Block videos via: Video Title / Channel Name / Channel ID / Video ID
  • Block comments via User / Comment content
  • Block videos within YouTube using context menus
  • Blocked videos do not appear anywhere on the site
  • Support for m.youtube.com on Firefox for Android and Kiwi Browser
  • Block complete channels
  • Supports both keywords and raw Regex
  • Does not break or limit any features of YouTube like playlist or autoplay
  • Hide and block the Trending section
  • Protect extension options with a password
  • Filtering is done before any DOM rendering

Install

FAQ

  • What is the difference between "Channel ID" and "Channel Name"
    Channel names on YouTube are not unique and can be duplicated/changed
    whereas Channel ID is a unique identification string that never changes.
    If you want to block a specific single channel the preferred method is using it's ID,
    If you want to block multiple channels sharing similar name use it's name.

  • How can I get a channel's ID?
    Channel ID looks like this: UCXXXXXXXXXXXXXXXX
    To get it, simply browse to a channel page and look at the URL /channel/UCXXXXXXXXXXXXXXXXXXXX
    If the URL is /user/BadChannelExample use This site to convert the username to the channel ID

  • How to block comments from specific user?
    Blocked channels comments are removed as well, so just add the user's name/channel ID to your filters

  • What is the behaviour when browsing blocked channel?
    User will be redirected to YouTube homepage.

  • What is the behaviour when browsing blocked video?
    You can choose between two options:

    • Block the entire page and leave a custom message
    • Auto redirect user to the next video
  • How can I ensure this extension cannot be bypassed?
    TODO

Development & Build

Ubuntu

# Install build requirements
sudo apt install nodejs npm
sudo npm install -g terser

# Clone Repo
git clone https://github.com/amitbl/blocktube

### Make your changes ###

# Build package
./tools/build.sh firefox
./tools/build.sh chrome

# Output packages locations
./dist/firefox/blocktube_firefox_VERSION.zip
./dist/chrome/blocktube_chrome_VERSION.zip

# Temporary installation / debugging
Firefox: https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox/
Chrome: https://developer.chrome.com/docs/extensions/mv3/getstarted/development-basics/#load-unpacked

Future work

  • User-friendly options UI
  • Sync options to cloud provider / enterprise policies
  • Whitelist mode
  • Dynamic rules (match multiple rules to block a video)

License

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

Acknowledgments

blocktube's People

Contributors

admicos avatar amitbl avatar emanchado avatar github-actions[bot] avatar sugiiiiii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blocktube's Issues

Sometimes breaks youtube

addon kills all functionality on youtube and blanks all pages some times, this may be a result of youtube throwing a captcha when searching. After restarting the browser a few times it seems to fix itself

Thank you

I've found your extension today on HN and immediately fell in love with it.

Thank you amitbl for your work!

[Feature Request] Block only videos between options

Hello, great tool!

Actually the only option to block a great range of videos is the "Allow only videos between".

Adding a "Block only videos between" will make easy the block the most toxic videos widely between 10:00 and 10:20 minutes with a 600 - 620 seconds settings.

Regards,

Legacy

This add-on is currently marked as legacy and not verified in firefox dev.

[bug] Regex sometimes doesn't seem to work..

Seems that sometimes regex doesn't seem to want to work.

Example -- I have /(fortnite|fortnite battle royale)/ig or even just /(fortnite)/ig or /(fortnite battle royale)/ig in my "Video title" filter and yet fortnite videos still end up showing up on a channels page.

https://www.youtube.com/channel/UCAJ41d46i6mcNAsvsWRc9hw
https://www.youtube.com/channel/UCAJ41d46i6mcNAsvsWRc9hw/videos

or even doing a search returns tons of results as well still
https://www.youtube.com/results?search_query=fortnite

If I don't do regex and just use Fortnite or Fortnite Battle Royale instead it removes the videos just fine, it only seems that with regex variant videos still ends up showing up in various places with the keywords that have been blocked.

[Feature request] More allow only videos

Hi,

An example would be only allow if less than x views, or a range between x and y.
Another example would be only allow if matches 1080p.

I would be nice to choose a specific value, say allow only if less than 500 views. Or even better a range, allowing only between 1.5k views and 10k.

I also would like an option to only allow videos if they match 1080p option in search results.

Thanks!

[Bug] Video player controls occasionally don't respond to mouse events

Version Information

OS: MacOS Version 10.13.6
Chrome: Version 77.0.3865.75
BlockTube: v0.3.7

Issue Description

After installing the BlockTube in Google Chrome the controls in the youtube player sometimes don't respond to mouse movements. A click on the video is required to bring the player back to the expected state.

The issue stops as soon as the extension is disabled.

[Bug] Overzealous blocking

Example: /love you./i under the Comment content section
Expected result: block comments that say "love you." verbatim
Actual result: all comments with "love you" (no period), "love your", etc. are blocked. Testing reveals that the period is at fault, as /love you /i with a space at the end and /love you!/i with an exclamation mark don't block comments with "love your" in it, whereas the /love you./i filter does.

Option to get rid of india videos/block the region

Hi,
Do you have any ideas how can I block the entire indian region? YT gone mad recently and they trying to shove their garbage 'content' down my throat (even in incognito mode, if you try to search for new mobile phones for example and their region got 'em early you will most likely to see only their videos until big channels in Europe do their own videos/reviews)
I tried to add their alphabet but for some reason its not working properly and even if I copy certain symbol (from search results) and hit apply it will still appear in the search results??

Videos and channels not being blocked

I have defined several filters in the Video Title and Channel name blocks and also from the three dot context menu. But, videos matching those terms still appear.

e.g.
*JRE*
*Rogan*
// Blocked by context menu (JRE Clips)
UCnxGkOGNMqQEUMvroOWps6Q

and they're still getting through. Suggestions appreciated.

Languages not English are not recognized

All filters work fine for English; however, video title and channel name filters don't work for non-alphabetical languages, at least Japanese and Chinese.

Environment:

  • OS: macOS Mojave 10.14.6
  • Chrome: Version 77.0.3865.75 (Official Build) (64-bit)

[Feature request] Option to turn off autoredirect to homepage

(Sorry, hit the enter key by accident before I was ready xP)

For the most part, I understand the autoredirect feature; however, there are times when I want to keep the channel/user/keyword/etc blocked, but also still want to see specific videos. For example, wanting to keep an artist's name blocked because people post a lot of useless videos about them, but still being able to go to links of their music videos without having to turn the addon off beforehand.

Video Blocker had this function and I loved how it worked, so I'm really hoping it's not to hard to add here.

[Bug] All videos blocked

If you create a block rule for a video or channel ID with brackets in it (for example: /[hindi]/i), all videos on YT will be blocked.

Feature request: Reorder Video ID and Channel ID sections to be most-recent first

With Youtube's new redesign, I am relying more and more on BlockTube, especially the Channel and Video blocks from the Context Menu to try to stem the tide against useless content.

It would be helpful if the Video ID and Channel ID sections showed the most recent items first.

Rationale: I am noticing that Context Menu blocks don't always take effect even when the video or channel thumbnail is replaced by the "Blocked" icon. I block several at a time and down the line, after refreshes, I may still see one or more of these channels or videos appear. I then go to the Video ID or Channel ID sections and have to scroll extensively to get to the bottom of the list to see that the items had not been added and ensure that they add the next time I issue the blocks.

If these lists were ordered most-recent first, it would save a lot of scrolling as my block list is now rather large.

I use a mix of BlockTube and uBlock Origin but since Youtube has removed the titled sections and lumped everything under "Recommended" BlockTube is much more important now.

[Bug] YouTube does not load anymore due to BlockTube

This is a review i wrote on Firefox's Add-on site.

BlockTube now avoids YouTube from loading...

Also there is no way to blacklist playlists such as the "Illegal Memes" playlist.

I guess my recommended feed will be polluted with Tik Tok and Gacha Life.

I seriously don't want to watch 500 unfunny meme videos, or edgy Tik Tok memes or low-quality suggestive Gacha Life content.

[Bug] Video thumbnails still visible

Up until now, this tool has been working exactly as described. However, just recently, a video containing my blocked keywords appeared in my recommended feed. I clicked it as a test, and the video itself is blocked correctly. But, yeah, the thumbnail is still showing (which is a big issue for avoiding movie and game spoilers).

Interestingly, when searching for those exact keywords, the associated videos don't appear in the search results (functioning correctly).

Latest update completely breaks youtube

Whatever you did in the update today completely broke youtube, as trying to load youtube with blocktube active causes this to happen https://i.imgur.com/u6hVZR8.png I have tested this in a incognito tab on chrome to verify that it is blocktube that is causing this and no other extension.

Disabling blocktube brings back youtube just fine, but obviously with all my blocked videos/creators showing due to the fact that well I disabled blocktube..

there are no errors or anything in chrome console, nor any errors being picked up by blocktube extension itself.

Hope you can figure out the issue that causing this as blocktube is a very needed extension imo

[Feature suggestion] Block live videos/streams

Hi,
Please add an option to block live streams, would be nice if they would be blocked only during their streaming section, then get unblocked if the channel decided to publish the video.
I have some channels that tend to abuse this function almost every day I see their notification on top of the subscription list on top for hours and its getting really annoying

I would like to add more features to the plugin

Hi! I have some features on my mind and was planning to create a similar plugin but found yours first. I would like to add those features to your plugin and send a pull request. Are you still actively maintaining the extension??

Regards,
Shivam Rastogi

user comment block function not clearly visible

I have been searching for a firefox extension for a while now to block specific user comments and I almost skipped past this one not noticing you can add users to the Channel Names field and it will block their comments along with channel video uploads. Maybe it could be made slightly more clear in the firefox extension description and the extension settings area that this function can be used to block user comments also, which has been absent from most other youtube extensions.

Language

You may add the possibility of languages, if needed I help you in translate, in portuguese and another languages.

[Feature request] Option to have "block all verified channels"

Hello,
I been using the Firefox extension and it's been great so far. I was wondering if it would be possible to put an option something like "block all verified channels"
Nowadays if you search for something, most of the time it shows all the big channels and/or news channels that are "verified"
sometimes that's not what I want, I want to discover random video through random/small channel.

Unexpected general rule

If a channel name that you have block finish by " official", all channels whose also finish by " official" will be blocked.
How to avoid this?

Firefox Android support

I tried it in Firefox for desktop and I was impressed by how great it was! Impressive work!

I have two young sons and they both have an Android phone and support for such an extension for Firefox Android would really be a lifechanger for me. Do you think this would require too much work or there are some needed WebExtension APIs that aren't available in the Firefox for Android version?

Thanks in advance!

[Bug] Blocktube + Iridium makes video pages not load correctly..

Dunno what exactly is going on here as I just started to experience this after running the two together for a long time, but anyways I'm running both the latest version of blocktube and the latest version of Iridium (https://github.com/ParticleCore/Iridium)..

Issue --

Playing a video, and then going to the next video does not load the page correctly, it'll load the video correctly but the page will still be showing information for the recently played episode, going any further into watching other videos still shows the information from the very first video watched, only way to temporarily fix it seems to either refresh the tab or go to the home/subscription page and then go back to watching videos but the bug will happen again once you start watching videos and move onto watching another video.

Testing with Iridium enabled and Blocktube disabled:
Everything works as expected.

Testing with Iridium Disabled and Blocktube enabled:
Everything works as expected.

Testing with Iridium enabled and Blocktube enabled:
The issue I mentioned above happens.

All testing done with a clean chrome profile.

Edit: did a bit more testing, it seems that there is something conflicting between the blacklist option that's in iridium and blocktube, as it seems that once that was disabled the page loads correctly whenever going to another video. Thankfully I don't need the blacklist option in iridium so I can turn it off since I use blocktube, but just thought I'd say that I at least maybe found the issue incase you want to take a better look into things.

Blocktube logo design

I brought a new look for the Blocktube.With this logo, the function of the extension becomes even more prominent. at first glance, it's clear what it means. select whatever you want and I will send you whatever files you want. This is my gift to you. I hope you like it. :)

1
2
3

Suggestion: Flexbox CSS with a higher contrast styling for the options page

Just offering a suggestion. I use BlockTube and love it for letting me block crap videos that my kids stumble on.

But the options page is sometimes hard to see or work with. I know you have the form textareas full width, but it would be possible to make them not as wide but still mobile responsive with CSS Flex or even a library like Bulma.

If you want, I can take a stab forking this and restyling it. Just let me know

No way to remove individial videos in history

"Block Video" and "Block Channel" options are available in history. But the little X that allows you to "Remove from Watch history" is not available. If I disable BlockTube, it reappears.

Blocktube 0.3.8 not working in Firefox

Since Video Blocker no longer works on YouTube Polymer, I tried switching to Blocktube. It works on Chrome (also at version 0.3.8). But on Firefox, YouTube is completely broken and looks like my screenshots below, even if there are no filters entered in Blocktube. (First is youtube.com homepage, second is search results via URL.)

Did not try it on YouTube classic view, since that goes away forever starting next month.

screenshot01
screenshot02

Block playlists

Playlists from blocked channels still appear on the sidebar.

VEVO sneaking through

Feel free to merge with #38 if appropriate.

I have Vevo in both my channel and video block lists. But, videos with VEVO in the channel name get through. Example:
YouTube

I've tried it as vevo, Vevo, and VEVO without success. Shouldn't it match even if it is only part of a channel or video name?

Thanks.

OGitC

[Feature Request] Disable/Block Videos on YouTube’s Home Page

Whenever I visit YouTube’s home page it is populated by Recommended videos that don’t interest me. No matter how many I Block with the BlockTube extension, more will appear indefinitely upon refresh. Is there a feature to disable/block YouTube’s home page videos in the same way that there is the option to disable its Trending page? If not, would it be possible to implement such a feature?

Request: Build a category wise blocking

I have completely cut off my Facebook but being a programmer it is essential for me to use YouTube for educational purposes. But YouTube keeps recommending the off-topic very interesting videos which lead to the dark hole of time wastage.

I wish I could simply filter the content by categories such as "educational", "motivational", "entertainments".

Do you think it would be doable?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.