Created
September 5, 2013 19:35
-
-
Save ryon/6455021 to your computer and use it in GitHub Desktop.
Bookmarklet to expand a YouTube embed iframe to fill the window (will collapse if used again)
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
javascript:(function()%7Bvar%20yt=document.querySelector('iframe%5Bsrc*=%22youtube.com/embed%22%5D'),ytExpanded=!!yt.dataset.iframeExpanded,ytStyle=yt.style;if(ytExpanded)%7Byt.style.cssText=yt.dataset.ytOldStyle;yt.removeAttribute('data-iframe-expanded');%7Delse%7Byt.dataset.ytOldStyle=ytStyle.cssText;yt.dataset.iframeExpanded=true;ytStyle.position='absolute';ytStyle.width='94%25';ytStyle.height='94%25';ytStyle.boxShadow='0%200%203em%20rgba(0,%200,%200,%20.8)';ytStyle.top='3%25';ytStyle.left='3%25';%7D%7D)(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment