r/JavaScriptTips • • Jan 08 '23

YouTube

Hi I hope this is the right subreddit to ask this. How do I hide all Elemtens on the YouTube homepage except the search bar? Thanks in advance!!

1 Upvotes

2 comments sorted by

View all comments

3

u/digitalmonkey87 Jan 08 '23

document.querySelector('#contents').style.display = 'none'