Last active
May 20, 2020 15:14
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 Fixed!
Nice. Thanks!
If I try this on a breakout session, I get this error:
Uncaught TypeError: Cannot read property 'style' of null
at :1:40
@zo0o0ot Yeah they use a different structure there 😢 I can try to update it for sessions
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';
@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
Nice! Although, there still are margins on bigger screens.