You will need to install a user script manager extension to install this script.
You must already have YouTube's material theme (you can opt-in at http://youtube.com/new) for this script to work.
This script is fully compatible with my similar script, Automatic Material Dark-Mode for YouTube.
Totally optional. ;-)
The script hardcodes the name and location of the menu items it clicks, so there's a very big chance that it'll stop working within a few years (whenever YouTube changes their design again). If it breaks, do NOT freak out and blast this page with negative reviews. Instead, be patient and wait while I update it when I have time. If you ungratefully blast me with negative reviews due to YouTube suddenly changing their design (which isn't my fault), then I won't bother updating this script for you at all.