Better YouTube

Toggle mini player when scrolling down in YouTube. Video download by using youtubeinmp3.com API. Rebind space key for play/pause (no more accidentally scroll down).

< 脚本Better YouTube的反馈

评价:好评 - 脚本运行良好

§
发表于:2017-06-11

I'm going to fork this

The reason why is because I only need the Mini-player functionality.

The other stuff is just unnecessary feature bloat (You can press k to play/pause; there are better tools such as youtube-dl for downloading videos), and if that wasn't enough, the spacebar override is just irritating.

Did you know that it cancels the ability to type a space into a comment (but for some reason, not the search bar)? That'sprettyannoying.

And it's easy to fix, too.

if(ev.target === /* reference to comment box */)
    return false;

Put that at the top of the event handler and it will cancel if you're focused on a comment box.

Also use document.body.addEventListener("keydown", function(ev){...}), not document.body.onkeydown = function(ev){...}. The reason why is because handlers registered via addEventListener can stack and are called in order of registration, while on... will aggressively override any default functionality.

Anyways, you can expect to see a "Simple Mini Player" script coming around some time in the future. In the mean time, I'm uninstalling yours because I can't deal with that spacebar nonsense.

§
发表于:2017-09-07
编辑于:2017-09-07

I had originally thought that Better YouTube was a fork of a deprecated and deleted YouTube Mini Player. Now I can see that YTMP evolved into BYT. I think I'll just find my favorite version from the revision history and fork that, rather than tear through and move around 200 lines of moderately messy JavaScript (by my standards).

Update: I've made the fork. It's based on v5.1, before the extra features started to creep in, but after the script had had some time to mature. Here it is: https://gf.qytechs.cn/en/scripts/32992-youtube-mini-player-fork

发表回复

登录(不可用)以发表回复。

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址