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).
< Commentaires sur Better YouTube
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://greasyfork.org/en/scripts/32992-youtube-mini-player-fork
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.
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){...})
, notdocument.body.onkeydown = function(ev){...}
. The reason why is because handlers registered viaaddEventListener
can stack and are called in order of registration, whileon...
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.