Follow

I think I finally made my "dream" YouTube video blocker. Or at least, a prototype of it.

=> userscript, so no browser lock-in (also shouldn't depend on any particular userscript loader)

=> A LOT more control over what's being blocked as each "filter" is just a function over the video data

=> (Currently) less than a 100 lines of code

The main reason I actually spent the effort for this could be easily summed up by this 2 line filter:

(
vid.length <= 5*60 // 5 minutes
&& vid.views >= 250_000
);

· · Web · 2 · 0 · 0

Working on making this thing a lil' more robust and it turns out YouTube uses fetch() everywhere EXCEPT on video sidebar recommendations. I guess I'll override XHR too.

*sigh*

Show thread

Finally got it working to a point where I can take a break from it.

Also it grew an extra 100 lines "because YouTube".

If anyone else wants to check it out:

git.ebc.li/admicos/snippets/sr

Show thread
Sign in to participate in the conversation
unnecessary posts 2: the electric toot-aloo

Personal server. Totally overkill but ok.