Hiding YouTube playback controls in a browser
So, I was looking for a practical answer to a simple problem this morning. I needed to hide the YouTube playback controls bar in a certain video I was interested in using a screenshot from. Just didn’t want them to show up in the picture. I knew there’s at least one Google Chrome extension that gets the job done, but a secondary drawback to this is that I needed the screenshot to be used in my work computer, and the company’s security policies block the installing and usage of browser extensions. I also tried a piece of javascript code many had sworn to work, to no avail. And it was then, that after some more web exploring, I came across this Reddit post, where user /u/Rofang offered yet other two javascript code pieces, this time to be type straight into the browser’s javascript console:
document.querySelector('.ytp-chrome-bottom').style.display = 'none'
And it worked! Thus, I got my screenshot. The same post also has the reverse code, to make the playback controls reappear once you’ve finished your business. Again at the javascript console, all you need to do is type:
document.querySelector('.ytp-chrome-bottom').style.display = ''