Skip to content

Instantly share code, notes, and snippets.

@kamranayub
Last active May 20, 2020 15:14
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kamranayub/28aa87d80e7fe4253a63c866daa9e83b to your computer and use it in GitHub Desktop.
Save kamranayub/28aa87d80e7fe4253a63c866daa9e83b to your computer and use it in GitHub Desktop.
Make MSBuild 2020 player stretch across the window and chat below. Hit F12 and paste into console.
// F12 Dev Tools and copy and paste into console!
// Stretches studio player 100% and chat below.
var studioPlayer = document.querySelector("studio-player");
var studioVideo = document.querySelector(
".home-page__live-stream--content__video"
);
var chat = document.querySelector(".home-page__live-stream__info");
if (studioPlayer && studioVideo && chat) {
studioPlayer.style.display = "block";
studioVideo.style.width = "100%";
chat.style.height = "600px";
chat.style.width = "100%";
}
var content = document.querySelector(".session-detail__content--grid");
var sidebar = document.querySelector(".session-detail__content--side-bar");
if (content && sidebar) {
sidebar.style.float = "none";
content.style.width = "100%";
content.style.float = "none";
}
var viewContainer = document.querySelector(".view-container");
viewContainer.style.maxWidth = "100%";
viewContainer.style.padding = "0";
@zo0o0ot
Copy link

zo0o0ot commented May 19, 2020

Nice! Although, there still are margins on bigger screens.

image

@kamranayub
Copy link
Author

@zo0o0ot Fixed!

@zo0o0ot
Copy link

zo0o0ot commented May 19, 2020

Nice. Thanks!

@zo0o0ot
Copy link

zo0o0ot commented May 20, 2020

If I try this on a breakout session, I get this error:
Uncaught TypeError: Cannot read property 'style' of null
at :1:40

@kamranayub
Copy link
Author

@zo0o0ot Yeah they use a different structure there 😢 I can try to update it for sessions

@kamranayub
Copy link
Author

Sessions:

var content=document.querySelector('.session-detail__content--grid');content.style.width='100%';content.style.float = 'none';
var sidebar=document.querySelector('.session-detail__content--side-bar');sidebar.style.float='none';

@kamranayub
Copy link
Author

kamranayub commented May 20, 2020

@zo0o0ot Updated and posted for session page. There are still margins. Fixed, script works on both homepage and sessions now.

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