amitbl / blocktube

YouTube™ content blocker
GNU General Public License v3.0
957 stars 67 forks source link

Block shorts #188

Closed LoganDark closed 2 years ago

LoganDark commented 3 years ago

Only reason I installed the extension, looks like it's not supported. The best I can do is block "shorts" in title and channel name, for all videos that are <= 60 seconds (using an advanced filter). Code below.

(video, objectType) => {
    if (objectType === 'videoRenderer' && (/shorts/i.test(video.channelName) || /shorts/i.test(video.title) && video.vidLength <= 60)) {
        return true
    }

    return false
}

Would be nice to block the #Shorts tag instead. #150

ghost commented 3 years ago

Try adding /.*shorts.*/i in Channel as well as Video Title box. It will show some false positives. or You can replace /shorts/i with /.*shorts.*/i here. (video.channelName.find(/shorts/i) || video.title.find(/shorts/i)

LoganDark commented 3 years ago

Try adding /.*shorts.*/i in Channel as well as Video Title box. It will show some false positives. or You can replace /shorts/i with /.*shorts.*/i here. > (video.channelName.find(/shorts/i) || video.title.find(/shorts/i)

You made me realize I should have used RegExp.test since String.prototype.find doesn't exist.

Point still stands though.

ghost commented 3 years ago

Is there a way to block all comments on all videos with this extension?

LoganDark commented 3 years ago

Is there a way to block all comments on all videos with this extension?

https://chrome.google.com/webstore/detail/unhook-remove-youtube-rec/khncfooichmfjbepaaaebmommgaepoid

ghost commented 3 years ago

I know that. Is it possible with this extension?

Do you know any other that filters YouTube based on category, other than blocksi?

LoganDark commented 3 years ago

Is it possible with this extension?

No

Spaceship3000 commented 3 years ago

Is there a way to block all comments on all videos with this extension?

Is it possible with this extension?

No

Yes, just add /.*/i in the comment blocker field. However it will keep trying to load (and continously block) every comment of the video in the background, which might use resources based on scenario.

A much better way is simply to add ###sections.ytd-comments

In the filters of your adblocker.

streaky commented 2 years ago

Just dislike every short you see and it got rid of them for me. Not saying it'll work for everybody but it seemed to.

LoganDark commented 2 years ago

Just dislike every short you see and it got rid of them for me. Not saying it'll work for everybody but it seemed to.

YouTube recently removed dislikes for videos so that won't work anymore.

streaky commented 2 years ago

YouTube recently removed dislikes for videos so that won't work anymore

They didn't, they removed public count display not the ability to dislike, but that was a typo on my part - I meant click the 3 dot menu and pick the "not interested" option. I did that for all the shorts youtube was trying to show me on the page, refreshed and the whole section was gone, hasn't come back since.

LoganDark commented 2 years ago

the whole section was gone

I already have a userscript to remove all the "sections", so I'm not talking about those. Just shorts showing up in the normal videos on the home page.

streaky commented 2 years ago

Oh, you have "official" shorts mixed in with normal videos rather than a section for them mixed in? Ew.

LoganDark commented 2 years ago

Oh, you have "official" shorts mixed in with normal videos rather than a section for them mixed in? Ew.

Not sure what official means. By shorts I mean any video in mobile form factor, under 30 seconds, and with the #Shorts tag. Those show up in the normal feed as they are just normal videos.

I've gotten rid of most of them by blocking any video or channel name that has short or shorts anywhere.

biigchief247 commented 2 years ago

I was able to hide most of the shorts by blocking any video with a duration less than 65 seconds. Now Youtube seems to have changed something to where the duration doesn't show on shorts videos, so they're not being blocked anymore. Is there a workaround for this using a script in the advanced mode?

Clarification: The videos are being somewhat blocked...Blocktube prevents them from actually being played, they aren't being shown in my subscription feed, and I haven't noticed any showing up on the Youtube home page feed, but they are appearing in the search results with a logo on the bottom right of the video that says "shorts", in place of the video duration.

biigchief247 commented 2 years ago

The url that shows when I hover over shorts videos in the search results now seems to be youtube.com/shorts/**

Is there a way to block all the videos that have that /shorts/ in the url?

LoganDark commented 2 years ago

As of https://github.com/amitbl/blocktube/commit/48b771e4306ff38c9405475813737c7625fa8c0c there is now an option to block shorts!