DEV Community

Mithat Akbulut
Mithat Akbulut

Posted on AI-assisted

I made a YouTube Shorts blocker, then my brain found another way to waste time lol

So I've been trying to spend less time on social media.

Deleted Instagram and Twitter, kept Reddit on desktop only. Also deleted the YouTube app from my iPhone, but I still wanted to watch videos so I kept using Safari.

And of course, I ended up watching Shorts there instead.

I made a tiny userscript called NoShorts that removes Shorts completely. Just plain JavaScript, nothing complicated.

And it actually worked really well. I don't even try opening Shorts anymore. Sometimes friends send me Shorts links and they just don't open, so I move on.

But then I noticed something.

I was spending hours watching normal YouTube videos instead. Sometimes until 2am, watching stuff I didn't even care about that much. So I built another userscript.

This one tracks actual video playback and lets you set a daily limit. There's a small timer on the video, a drawer with your watch history and when your time runs out, playback stops.

I also made limit changes take effect tomorrow once you've started watching. Otherwise I'd probably just keep increasing it haha.

Everything runs locally using the userscript manager's storage. No backend, accounts or subscriptions.

I noticed a few people were using the original version on GitHub and Greasy Fork, which was a pretty nice surprise.

Both scripts are free and open source:

https://github.com/mithatakbulut/noshorts

Still a small side project, but I use it every day. That's probably the best part.

showdev #javascript #opensource #webdev

Top comments (0)