YouTube - Disable Inline Playback ("Keep hovering to play")

Disable the Inline Playback feature ("keep hovering to play") on YouTube even when logged out

Daily installs
Total installs
3 2 1
Applies to

YouTube recently pushed out a change called "Inline Playback" which, instead of playing a short GIF of a small section of the video when hovering over a recommendation, the site will start playing the video from the start without sound. This not only results in a slower and more clunky experience, it can also affect your future recommended videos because the video will actually be added to your watch history.

This is a very basic script I wrote to revert to the original behavior without needing to be logged in. It is imperfect, but reach out to let me know of any changes I could make. The biggest issue is that it still takes about a full second for the video preview to start playing, as well as for the Watch Later and Add To Queue buttons to show up. If a better coder than me can figure out how to avoid this behavior, then please let me know and I will add it to the code, or feel free to modify and distribute your own modified version of this script which corrects this issue.

This script is only recommended if you usually use YouTube while logged out. If you are logged in, you can still revert to the old behavior using officially supported settings. Go to your Settings > Playback and Performance > Inline Playback and turn the feature off.

UPDATE JAN 19, 2022: Google made a change which breaks this script; it does still prevent the inline player from showing up when mousing over a video thumbnail, but the old GIF-style preview does not show up. I am trying to fix this, but for now, this will only work to disable inline playback and not to restore the old behavior.

Side note: it seems that logging in and disabling inline playback through YouTube settings, as described above, will turn it off and leave it turned off even after you log out. I would recommend doing this if you have an account, and disabling this script if that works for you. However, I will still try to fix this script since that may not work for everyone and does not help people without an account.