Created
March 12, 2024 21:43
-
-
Save benwoodward/6c7e25f30b9d075f0362da18c18e4fad to your computer and use it in GitHub Desktop.
Arc Boost for Matter: Enlarge video player
This file contains 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
.ednwsl8c { | |
max-width: 800px !important; | |
max-height: inherit !important; | |
} |
This file contains 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
function setYouTubePlayerDimensions(iframe) { | |
iframe.setAttribute('width', '800'); | |
iframe.setAttribute('height', '400'); | |
iframe.style.width = '800px'; | |
iframe.style.height = '400px'; | |
} | |
function checkAndSetIframeDimensions() { | |
const iframe = document.getElementById('ytPlayer'); | |
if (iframe) { | |
setYouTubePlayerDimensions(iframe); | |
} | |
} | |
// Call checkAndSetIframeDimensions every 500ms until the iframe is found and its dimensions are set | |
setInterval(checkAndSetIframeDimensions, 500); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment