blocktube icon indicating copy to clipboard operation
blocktube copied to clipboard

[Feature Request] Allow for blocking videos under a certain number of views

Open domeniczz opened this issue 1 year ago • 1 comments

Allow for blocking videos under a certain number of views.

For example never show videos under 100 views in the YouTube home page.

domeniczz avatar Feb 22 '24 13:02 domeniczz

You can do that using Advanced Blocking (video.viewCount)

3skue avatar Feb 24 '24 14:02 3skue

You can do that using Advanced Blocking (video.viewCount)

Thank you very much!

domeniczz avatar Feb 28 '24 06:02 domeniczz

can you maybe share the exact command?

stefson avatar Feb 28 '24 06:02 stefson

can you maybe share the exact command?

Add this line to your Advanced Blocking to hide videos under 1000 views. You can change the number to whatever you want.

(video, objectType) => {  if (video.viewCount < 1000) {return true; } return false; }

EDIT: Keep in mind you'll have to nest the if conditions (as shown below) if you want to have multiple rules. Just pasting in the above rule as is will cause other rules to stop functioning.

(video, objectType) => {
    if (video.publishTimeText.match("years")) {
        return true; // Block videos older than 1 year
    }
    if (video.viewCount < 1000) {
        return true; // Block videos with less than 1000 views
    }
    return false; // Allow all other videos
}

ercarp avatar Apr 29 '24 07:04 ercarp