Skip to content

Instantly share code, notes, and snippets.

@xtasyarmada
Last active July 10, 2022 20:04
Show Gist options
  • Save xtasyarmada/c3c7c93fc8bb367c77aec68ad11c4558 to your computer and use it in GitHub Desktop.
Save xtasyarmada/c3c7c93fc8bb367c77aec68ad11c4558 to your computer and use it in GitHub Desktop.
A Bookmarklet to Set a Theatre Mode for YouTube Live videos.
javascript:(function() { var video = document.querySelector('.html5-video-container > video.video-stream.html5-main-video'); video.style.width = '100%'; video.style.height = 'auto'; var columns = document.querySelector('#columns.style-scope.ytd-watch-flexy'); columns.style.maxWidth = 'initial'; var chat = document.querySelector('#chat.style-scope.ytd-watch-flexy'); chat.style.height = '90vh';})();
@xtasyarmada
Copy link
Author

YouTubeSample

@xtasyarmada
Copy link
Author

If you want to use this Bookmarklet:

  1. Create a new Bookmark in Chrome (I have only confirmed Chrome support).
  2. In the URL for the bookmark, paste the above code.
  3. When you go to a YouTube Live video, click the bookmark and your layout will be adjusted.

This will reset on page refresh, so you will have to click it each time you want the layout.

Enjoy!

@xtasyarmada
Copy link
Author

If you're from YouTube... here's a clean version.

(function() {
  var video = document.querySelector('.html5-video-container > video.video-stream.html5-main-video');
  video.style.width = '100%';
  video.style.height = 'auto';
  
  var columns = document.querySelector('#columns.style-scope.ytd-watch-flexy');
  columns.style.maxWidth = 'initial';

  var chat = document.querySelector('#chat.style-scope.ytd-watch-flexy');
  chat.style.height = '90vh';
})();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment