Skip to content

Instantly share code, notes, and snippets.

@abdyer
Created September 23, 2016 17:31
Show Gist options
  • Save abdyer/6d01f7a3b42f6b2fa860e48a755b069a to your computer and use it in GitHub Desktop.
Save abdyer/6d01f7a3b42f6b2fa860e48a755b069a to your computer and use it in GitHub Desktop.
Chromecast Screensaver
javascript:(function(){var w=window.innerWidth;var h=window.innerHeight;var scale=Math.max(w/1280,h/720);var e=document.createElement("div");e.style.border="0";e.style.position="fixed";e.style.top="0";e.style.left="0";e.style.width="100%";e.style.height="100%";e.style.zIndex="999999999";var i=document.createElement("iframe");i.src="https://clients3.google.com/cast/chromecast/home/v/c9541b08";i.frameBorder=0;e.style.border="0";i.style.width="1280px";i.style.height="720px";i.style.pointerEvents="none";i.style.webkitTransform="scale("+scale+")";i.style.webkitTransformOrigin="top left";e.style.overflow="hidden";e.addEventListener("click",function(n){n.preventDefault();this.parentNode.removeChild(this)},false);document.body.appendChild(e);e.appendChild(i)})();
@abdyer
Copy link
Author

abdyer commented Sep 23, 2016

Casting a web page in Chrome to play some music but don't want burn-in on your TV? Create a new bookmark and paste this script into the URL field. Click it to launch the default Chromecast screensaver. Click again to return to the web page you're casting.

Source: https://www.reddit.com/r/Chromecast/comments/1pmi6o/tab_casting_screensaver_for_audio_streaming/

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